帝國cms靈動標籤呼叫欄目數量限制的方法很簡單,方法如下:
正常呼叫當前欄目下的所有子欄目,程式碼如下:
[e:loop={"select classname,classpath,classid from {$dbtbpre}enewsclass where bclassid='$GLOBALS [navclassid]' order by myorder,classid asc",0,24,0}]
<li><a href="/<?=$bqr[classpath]?>/"><?=$bqr[classname]?></a></li>
[/e:loop]
限制只呼叫第一個子欄目,程式碼如下:
[e:loop={"select classname,classpath,classid from {$dbtbpre}enewsclass where bclassid='$GLOBALS [navclassid]' order by myorder,classid asc limit 1",0,24,0}]
<a href="/<?=$bqr[classpath]?>/"><?=$bqr[classname]?></a>
[/e:loop]