聯(lián)系官方銷售客服
1835022288
028-61286886
導航循環(huán)如何判斷是當前欄目就輸出 style="display: flex;",不是當前欄目就輸出 style="display: none;"
{category module=share pid=0} <li class="{if IS_SHARE && $catid && dr_in_array($catid, $t.catids)} active{/if}"> <a class="font-bold" href="{$t.url}" title="{$t.name}" {if $t.tid==2} target="_blank"{/if}>{$t.name}</a> {if $t.child} <ol class="x-head-nav-second none" style="display: flex;" > {category module=share pid=$t.id return=t2} <li class="{if $t2.child} dropdown-submenu{/if} {if IS_SHARE && $catid && dr_in_array($catid, $t2.catids)} active{/if}"> <a class="flex" href="{$t2.url}"> </a> </li> {/category} {/if} </ol> {/category}
官方提醒:使用category欄目循環(huán)標簽的生成工具,填寫參數(shù)就可以生成相關(guān)的代碼,每個參數(shù)后面都有用法解釋
獨立還是共享?
這個就是 ,你把display 包裹在里面就行了