不废话了,直接附源码给大家:
{pc:content action="category" catid="0" num="6" siteid="$siteid" order="listorder ASC"}
<ul class="nav navbar-nav">
<li class="{if !$catid}active{/if}"><a href="{siteurl($siteid)}">网站首页</a></li>
{loop $data $r}
<li class="{if $top_parentid == $r[catid]||$catid==$r[catid]||$parentid==$r[catid]}active{/if}">
<a href="{$r[url]}">{$r[catname]}</a>
</li>
{/loop}
</ul>
{/pc}
如有问题欢迎留言提问,与你共同学习~