ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 解決中 / 官方已回 如何調用 導航欄目,并且有 current功能(當前頁面顯示 class=“on”)? 5 0
dqterry 免費用戶 2021-10-15 17:24:42 私信
迅睿CMS版本:1.2.0

模板標簽里面

程序版本:V4.5.2 Bulid 2021-09-03

請教如何調用 導航欄目,并且有 current功能(當前頁面顯示 class=“on”)?

頂級欄目,這樣寫是沒啥問題的

{category module=share pid=0}
<a href="{$t.url}" {if dr_in_array($catid, $t.catids)} class="on"{/if}>
{$t.name}
</a>
{/category}

但是放到二級欄目后,current功能無法顯現

<div class="subnav mg tr mbox">
<span class="circle"></span>
{category module=share pid=$t.id return=t2}
<a href="{$t2.url}" {if dr_in_array($catid, $t2.catids)} class="on"{/if}>{$t2.name} </a>
{/category}
</div>

另外想請教下 pid和 return 有什么作用,有啥區別么?

官方提醒:使用category欄目循環標簽的生成工具,填寫參數就可以生成相關的代碼,每個參數后面都有用法解釋

解決方案