顶级导航
{pc:content action="category" catid="0" num="25" siteid="$siteid" order="listorder ASC"}
- class="nav-site">
- href="{siteurl($siteid)}">首页
- {loop $data $r}
- href="{$r[url]}">{$r[catname]}
- {/loop}
{/pc}
二级导航,可做二级下拉菜单
{pc:content action="category" catid="0" num="" siteid="$siteid" order="listorder ASC"}
{loop $data $r}
- {loop $data $r1}
- href="{$r1[url]}">{$r1[catname]}
- {/loop}
{/pc} {/if}
{/loop} {/pc}
内容页栏目导航,常见于企业站左侧栏目导航
- {if $top_parentid}
- {pc:content action="category" catid="$top_parentid" num="" siteid="$siteid" order="listorder ASC"}
- {elseif $parentid}
- {pc:content action="category" catid="$parentid" num="" siteid="$siteid" order="listorder ASC"}
- {else}
- {pc:content action="category" catid="$catid" num="" siteid="$siteid" order="listorder ASC"}
- {/if}
- {loop $data $r}
- class="{if $catid==$r[catid]}nuw{/if}" href="{$r[url]}">{$r[catname]}
- {/loop}
- {/pc}
附:所在栏目
- {if $top_parentid&&$top_parentid!=$catid}{$CATEGORYS[$CAT[parentid]][catname]}{else}{$CAT[catname]}{/if}