<{foreach from=$data item=parent key=parentId}> <{if $parent.sub}>
- <{$parent.label}> <{if $setting.showCatDepth_dropdown == '3'}>
  <{foreach from=$parent.sub item=child key=childId}> <{if $child.sub }>
  - <{$child.label}>
    <{foreach from=$child.sub item=gChild key=gChildId}>
    - <{$gChild.label}>
    <{/foreach}>
  <{else}>
  - <{$child.label}>
  <{/if}> <{/foreach}>
  <{elseif $setting.showCatDepth_dropdown == '2'}>
  <{foreach from=$parent.sub item=child key=childId}>
  - <{$child.label}>
  <{/foreach}>
  <{/if}>
<{else}>
- <{$parent.label}>
<{/if}> <{/foreach}>