判断当前栏目ID

{if $cat.id==3}{/if}

判断顶部栏目ID

{if $top.id==2 || $top.id==2}{/if}

判断是否顶级

{if $cat.pid==0}{/if}