<{foreach from=$data item=parent key=parent_id}>

- <{$parent.label}>

  <{if $parent.sub && $setting.showCatDepth_default == '2'}>

  - <{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}>

  <{elseif $parent.sub && ($setting.showCatDepth_default == '3')}>
  <{foreach from=$parent.sub item=child key=childId}>

  - <{$child.label}>

    <{if $child.sub && ($setting.showCatDepth_default == '3')}>

    - <{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}>
  <{/foreach}>
  <{/if}>
<{/foreach}>