聯系官方銷售客服
1835022288
028-61286886
請教我這樣寫不對嘛,同頁面中有一個了這樣的代碼了,另一個好用,這個不好二級欄目出不來
{category module=shop id=2 } <a href="{$t.url}" class="fl i">{$t.name}</a> {if $t.child} {category module=shop pid=$t.id return=t2 } <a href="{$t2.url}" class="fl i">{$t2.name}</a> {if $t2.child} {category module=shop pid=$t2.id return=t3} <a href="{$t3.url}" class="fl i">{$t3.name}</a> {/category} {/if} {/category} {/if} {/category}
以解決
使用官方的category欄目循環標簽的生成工具,以解決問題
{category module=shop pid=2 num=4 return=c1}
<a href="{$c1.url}" class="fl i">{$c1.name}</a>{if $c1.child}
{category module=shop pid=$t.id return=c12 }
<a href="{$c12.url}" class="fl i">{$c12.name}</a>
{/category}
{/if}
{/category}