調(diào)用全站欄目方法

  

 

網(wǎng)站全站欄目調(diào)用方法<!--loop頂級目錄-->

<a href="{$base_url}/">網(wǎng)站首頁</a>

{loop type() $t}

<h2><a href="{$t[url]}" {if isset($topid) && $topid==$t[typeid]}class="current"{/if}>{$t[typename]}</a></h2>

<!--loop一級目錄-->

{loop type($t) $t1}

<h3><a href="{$t1[url]}" {if isset($typeid) && $typeid==$t1[typeid]}class="current"{/if}>{$t1[typename]}</a></h3>

<!--loop二級目錄...-->

{loop type($t1) $t2}

<h4><a href="{$t2[url]}" {if isset($typeid) && $typeid==$t2[typeid]}class="current"{/if}>{$t2[typename]}</a></h4>

<!--loop三級目錄...-->

{loop type($t2) $t3}

<h5><a href="{$t3[url]}" {if isset($typeid) && $typeid==$t3[typeid]}class="current"{/if}>{$t3[typename]}</a></h5>

{/loop}

{/loop}

{/loop}

{/loop}