{eyou:channel type='top' row='10' id='field1' currentstyle='active'} // 第一級(jí)欄目循環(huán)開始<li>
<a href="{$field1.typeurl}" title="{$field1.typename}" class="{$field1.currentstyle}">
{$field1.typename}{$field1.typeid|GetTotalArc=###}
{eyou:notempty name='$field1.children'} // 判斷是否有子欄目(該示例指的是第二級(jí)欄目)
有子欄目時(shí)才顯示這里的html代碼,比如:箭頭、圖標(biāo)等
{/eyou:notempty}
</a>
{eyou:notempty name='$field1.children'} // 判斷是否有子欄目(該示例指的是第二級(jí)欄目)
<div>
{eyou:channel name='$field1.children' id='field2' row='10'} // 第二級(jí)欄目循環(huán)開始
<a href="{$field2.typeurl}" class="dropdown-item ">{$field2.typename}{$field2.typeid|GetTotalArc=###}</a>
{/eyou:channel} // 第二級(jí)欄目循環(huán)結(jié)束
</div>
{/eyou:notempty}
</li>
{eyou:type typeid='欄目ID' empty='暫時(shí)沒有數(shù)據(jù)'}<a href="{$field.typeurl}">{$field.typename}{$field.typeid|GetTotalArc=###}</a>{/eyou:type}
上面是例子 你試試