下圖所示的前端導(dǎo)航格式,默認(rèn)模板是用的網(wǎng)站導(dǎo)航,當(dāng)我們使用共享欄目的時(shí)候就不需要用網(wǎng)站導(dǎo)航了,我們可以用共享欄目的寫(xiě)法!

相關(guān)模板文件
/templates/pc/web/default/common/header.html

改為共享欄目調(diào)用方法
<!--第一層:調(diào)用共享欄目頂級(jí)數(shù)據(jù)-->
{list action=category module=share pid=0}
<li id="dr_nav_{$t.id}" class="menu-dropdown classic-menu-dropdown {if $catid && in_array($catid, $t.catids)} active{/if}">
<a href="{$t.url}" title="{$t.name}">{$t.name}</a>
{if $t.child}
<ul class="dropdown-menu pull-left">
<!--第二層數(shù)據(jù)-->
{list action=category module=share pid=$t.id return=t2}
<li class="{if $t2.child} dropdown-submenu{/if} {if $catid && in_array($catid, $t2.catids)} active{/if}">
<a href="{$t2.url}" class="nav-link nav-toggle " title="{$t2.name}" >
{$t2.name}
</a>
{if $t2.child}
<ul class="dropdown-menu pull-left">
<!--第三層數(shù)據(jù)-->
{list aaction=category module=share pid=$t2.id return=t3}
<li class="{if $catid && in_array($catid, $t3.catids)} active{/if}">
<a href="{$t3.url}" >
{$t3.name}
</a>
</li>
{/list}
</ul>
{/if}
</li>
{/list}
</ul>
{/if}
</li>
{/list}
文檔最后更新時(shí)間:2016-12-16 15:14:46