{php $child = get_maincat(0, $mid, 1);} {loop $child $i $c}
- {set_style($c[catname], $c[style])} {if $c[child]} {php $sub = get_maincat($c[catid], $mid, 1);}
  {loop $sub $j $s}
  - {set_style($s[catname], $s[style])}
  {/loop}
  {/if}
{/loop}

More Categories

{php $child = get_maincat(0, $mid, 2);} {loop $child $k $v}
- {set_style($v[catname], $v[style])} {if $c[child]} {php $sub = get_maincat($v[catid], $mid, 1);}
  {loop $sub $t $b}
  - {set_style($b[catname], $b[style])}
  {/loop}
  {/if}
{/loop}