帝国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]