首页 > 代码库 > 首页导航条栏目高亮显示

首页导航条栏目高亮显示

{pc:content action="category" catid="0" num="6" siteid="$siteid" order="listorder ASC"}
 <ul>
    <li  {if !$catid} class="active" {/if}><a href=http://www.mamicode.com/‘index.html‘>首页
    {loop $data $r}
    <li>|</li>
    <li {if $catid==$r[catid] || $top_parentid==$r[catid]} class=‘active‘{/if} ><a href=http://www.mamicode.com/‘{$r[url]}‘>{$r[catname]}
    {/loop}
    <div class="clear"></div>
 </ul>
  {/pc}