聯系官方銷售客服
1835022288
028-61286886
請問,我想調用欄目id為8下面的所有頂級欄目 的 第三個子欄目的文章列表下面的寫法哪不對呢,就是圖中3的文章列表,但是不能寫死的那種
{category module=share id=8}
{if $t.child}
{category module=share pid=$t.id return=t2}
{if $t2.child}
{category module=share pid=$t2.id num=3,1 return=t3}
{module module=news order=updatetime num=10}
<li style="width:100%;">
<a href="{$t2.url}" title="{dr_cat_value('news', $t.catid, 'name')}" style="color: #0b6db6;">[ {$t2.name} ]</a>
<a href="{$t.url}" title="{$t.title}" target="_blank">{$t.title}</a>
</li>
{/module}
{/category}
{/if}
{/category}
{/if}
{/category}
category標簽的 num=不能寫成3,1,這個嗯um只只能等于純數,表示控制循環的欄目數量。 {if $t2.child}在這個條件里面,可以增加那序號判判斷,就是加一個and條件語法,然后加個序號等于三的話,就表示他是他是第三個。。
回復@迅睿框架聯合創始人 不好意思,確實不太會這個,具體應該怎么寫呢