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