二级导航栏如何实现两级选中 ?
{category module=share id=1,2,3 }
<li><a href="{$t.url}"><button {if $cat.id == $t.id} class="active" {/if}>{$t.name}</button></a>
{if $t.child}
<div class="baikeList">
{category module=share pid=$t.id return=c}
<a href="{$c.url}" {if $c.id == $cat.id} class="active"{/if}>{$c.name}</a>
{/category}
</div>
{/if}
</li>
{/category}目前只能实现 选中 当前 栏目ID 如何能实现选中两级
{category module=share id=1,2,3 } <li><a target="_blank" href="{$t.url}"><button {if IS_SHARE && $catid && in_array($catid, $t.catids)} class="active"{/if}>{$t.name}</button></a> {if $t.child} <div class="baikeList"> {category module=share pid=$t.id return=c} <a target="_blank" href="{$c.url}" {if $c.id == $cat.id} class="active"{/if}>{$c.name}</a> {/category} </div> {/if} </li> {/category}if $c.id == $cat.id} class="active"{/if}改成{if IS_SHARE && $catid && in_array($catid, $c.catids)} class="active"{/if}默认模板现成的写法,哈哈