請問導(dǎo)航點(diǎn)擊跳轉(zhuǎn)后,選中狀態(tài)怎么處理?子欄目如何判斷
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" data-toggle="dropdown">
技能競賽
</a>
<div class="dropdown-menu mt-0">
<a class="dropdown-item" href="zyds_index.html">全國職業(yè)院校</a>
<a class="dropdown-item" href="zzgs_index.html">省市級賽項(xiàng)</a>
<a class="dropdown-item" href="gzgs_index.html">行業(yè)賽</a>
</div>
</li>
默認(rèn)模板的header頁面你可以參考一下手寫法
參考文檔:《當(dāng)前欄目高亮寫法》
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
<!--第一層:調(diào)用pid=0表示頂級--> {category module=share pid=0} <li class="nav-item dropdown {if IS_SHARE && $catid && in_array($catid, $t.catids)} active{/if}"> <a class="nav-link {if !empty($t.pids)} dropdown-toggle{/if}" href=" " {if $t.tid==2} target="_blank"{/if} id="navbarDropdown"> {$t.name} </ a> {if $t.child} <div class="dropdown-menu mt-0"> <!--第二層:調(diào)用第二級共享欄目--> {category module=share pid=$t.id return=t2} <a class="dropdown-item {if IS_SHARE && $catid && in_array($catid, $t2.catids)} active{/if}" href="{$t2.url}"><span class="iconfont">{html_entity_decode($t2.tubiao)}</span>{$t2.name}</ a> {/category} </div> {/if} </li> {/category}一樓二樓的方法對,其實(shí)就在默認(rèn)模板里面有現(xiàn)成的代碼