聯(lián)系官方銷售客服
1835022288
028-61286886
<ul id="subnav">
{category module=share pid=1 return=t}
<li {if $t.id==$catid} class="hover"{/if}><a href="{$t.url}" title="{$t.name}">{$t.name}</a>
{if $t.child}
<dl>
{category module=share pid=$t.id return=t2}
<dt><a href="{$t2.url}" title="{$field2.typename}">{$t2.name}</a> </dt>
{/category}
</dl>
{/if}
</li>
{/category}
</ul>
怎么實(shí)現(xiàn)我點(diǎn)擊的一級欄目或者是一級欄目下的二級欄目,一級欄目的樣式是class="hover"。上面代碼這樣設(shè)置后只能是對應(yīng)的一級欄目加了樣式,請教二級欄目點(diǎn)擊后一級欄目那里也加樣式需要怎么實(shí)現(xiàn)?
官方提醒:使用category欄目循環(huán)標(biāo)簽的生成工具,填寫參數(shù)就可以生成相關(guān)的代碼,每個參數(shù)后面都有用法解釋
用這個吧
這里填寫參數(shù)就可以生成相關(guān)的代碼,每個參數(shù)后面都有用法解釋,category標(biāo)簽的生成工具:http://223987.com/doc/code/category.html