{template 'header'}
{if $action=='letter'}
{loop $LETTER $L} {$L} {/loop} {$M[name]}
{if $CATALOG}

{loop $CATALOG $i $c} {if $i%8==0}
{/if} {set_style($c[catname], $c[style])} ({$c[item]}) {if $i%8==7}
{/if} {/loop}

{else}
没有字母 {$letter} 开头的类目
{/if}
{elseif $action=='module'}
{loop $LETTER $L} {$L} {/loop} {$M[name]}
{template 'catalog', 'chip'}
{else} {loop $MODULE $m} {if $m[moduleid] > 3 && !$m[islink]}
展开..{$m[name]}

{php $child = get_maincat(0, $m[moduleid]);} {loop $child $i $c} {if $i%6==0}
{/if} {set_style($c[catname], $c[style])}{if $c[child]} {php $sub = get_maincat($c[catid], $mid, 2);} {loop $sub $j $s}{if $j < 5} {set_style($s[catname], $s[style])}{/if}{/loop} {/if} {if $c[child]} {php $sub = get_maincat($c[catid], $mid, 1);} {loop $sub $j $s} {set_style($s[catname], $s[style])} {/loop} {/if} {if $i%6==5}
{/if} {/loop}

{/loop} {/if} {/if}
{template 'footer'}