phpcms自定义导航栏当前栏目高亮
程序员文章站
2022-07-13 16:53:51
...
<li class="home"><a href="/" title="首页" >首页</a></li>
{pc:get sql="select * from phpcms_category where catid in(27,14,21,26,33,68,28,69)" order="id ASC"}
{loop $data $r}
<li {if $r[catid]==$catid} class="cur"{/if}><a href="{$r[url]}" title="{$r[catname]}" target="_blank">{$r[catname]}</a></li>
{/loop}
{/pc}
27,14,21,26,33,68,28,69代表栏目ID