<{foreach from=$data item=parent key=parentId}> <{if $parent.sub}>
- <{$parent.label}> <{if $setting.showCatDepth_default == '3'}>
  <{foreach from=$parent.sub item=child key=childId}> <{if $child.sub }>
  - <{$child.label}>

    - <{if $setting.devide == '0'}>
      <{foreach from=$child.sub item=gChild key=gChildId name=gchildloop}> "><{$gChild.label}> <{if !$smarty.foreach.gchildloop.last}><{$setting.page_devide}><{/if}> <{/foreach}>
      <{else}> <{counter start=1 assign="result" print=false }> <{foreach from=$child.sub item=gChild key=gChildId}> <{if ($result mod $setting.devide) eq 1 }>
      "><{$gChild.label}> <{$setting.page_devide}> <{elseif ($result mod $setting.devide) eq 0}> | "><{$gChild.label}> <{$setting.page_devide}>
      <{else}> | "><{$gChild.label}> <{$setting.page_devide}> <{/if}> <{counter assign="result" print=false }> <{/foreach}> <{/if}>

  <{else}>
  - <{$child.label}>
  <{/if}> <{/foreach}>
  <{elseif $setting.showCatDepth_default == '2'}>

  <{if $setting.devide == "0"}>
  <{foreach from=$parent.sub item=child key=childId name=childloop}> "><{$child.label}> <{if !$smarty.foreach.childloop.last}><{$setting.page_devide}><{/if}> <{/foreach}>
  <{else}> <{counter start=1 assign="result" print=false }> <{foreach from=$parent.sub item=child key=childId}> <{if ($result mod $setting.devide) eq 1 }>
  "><{$child.label}> <{$setting.page_devide}> <{elseif ($result mod $setting.devide) eq 0}> | "><{$child.label}> <{$setting.page_devide}>
  <{else}> | "><{$child.label}> <{$setting.page_devide}> <{/if}> <{counter assign="result" print=false}> <{/foreach}> <{/if}>

  <{/if}>
<{else}>
- <{$parent.label}>
<{/if}> <{/foreach}>