{eyou:channel type='top' row='10' id='field1' currentstyle='active'} // 第一級欄目循環(huán)開始<li>
<a href="{$field1.typeurl}" title="{$field1.typename}" class="{$field1.currentstyle}">
{$field1.typename}
{eyou:notempty name='$field1.children'}
有子欄目時才顯示這里的html代碼,比如:箭頭、圖標(biāo)等
{/eyou:notempty}
</a>
{eyou:notempty name='$field1.children'} // 判斷是否有子欄目(第二級欄目)start
<div>
{eyou:channel name='$field1.children' id='field2' row='10'} //第二級欄目循環(huán)開始
<div>
<a href="{$field2.typeurl}" class="dropdown-item ">{$field2.typename}</a>
{eyou:notempty name='$field2.children'} // 判斷是否有子欄目(第三級欄目)start
<div class="dropdown-menu animate">
{eyou:channel name='$field2.children' id='field3' row='10'} //第三級欄目循環(huán)開始
<a href="{$field3.typeurl}" class="dropdown-item ">{$field3.typename}</a>
{/eyou:channel} //第三級欄目循環(huán)結(jié)束
</div>
{/eyou:notempty} // 判斷是否有子欄目(第三級欄目)end
</div>
{/eyou:channel} // 第二級欄目循環(huán)結(jié)束
</div>
{/eyou:notempty} // 判斷是否有子欄目(第二級欄目)end
</li>{/eyou:channel} //第一級欄目循環(huán)結(jié)束
三級的你就用上面來套用。要想確認后臺是否有三級欄目以及前段樣式有沒有三級拉伸樣式等
缺一不可