帝国cms自带的专题调用标签用着不方便,还是灵动标签用着方便。下面看看在帝国cms模版中用灵动标签loop调用专题的信息吧

代码:

[e:loop={'select ztid,ztname,ztimg,maxnum,intro,onclick,ztpath from [!db.pre!]enewszt where showzt=1 order by ztid limit 8',10,24,0}]
<li>
<div class=i><a href=<?=$public_r[newsurl]?><?=$bqr[ztpath]?> target=_blank><img src=<?=$bqr[ztimg]?> alt=<?=$bqr[ztname]?> /></a></div>
<div class=t><a href=<?=$public_r[newsurl]?><?=$bqr[ztpath]?> target=_blank><?=$bqr[ztname]?></a></div>
<div class=s><?=$bqr[intro]?></div>
<div class=s><span class=l><?=$bqr[onclick]?>次点击</span><span class=fr><?=$bqr[maxnum]?>首</span></div>
</li>
[/e:loop]

 
enewszt 是专题表名

showzt=1 为专题分类ID,多个专类分类,改成:showzt in(1,2,3,4,5,6,7)

html根据自己网站模版修改即可!