V6.5在原來(lái)所有信息調(diào)用標(biāo)簽基礎(chǔ)上增加了兩個(gè)標(biāo)簽參數(shù):“附加SQL條件”和“顯示排序”。
以靈動(dòng)標(biāo)簽為例,6.5版標(biāo)簽語(yǔ)法為:
[e:loop={欄目ID/專題ID,顯示條數(shù),操作類型,只顯示有標(biāo)題圖片,附加SQL條件,顯示排序}]
模板代碼內(nèi)容
[/e:loop]
例子:調(diào)用標(biāo)題包含“cms”的新聞
6.0以前版本要使用SQL調(diào)用,如下:
[e:loop={"select * from phome_ecms_news where title like '%cms%' and checked=1 order by newstime desc limit 10",10,24,0}]
<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a><br>
[/e:loop]
而6.5版本用下面就可以實(shí)現(xiàn)上面效果:
[e:loop={'news',10,18,0,"title like '%cms%'"}]
<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a><br>
[/e:loop]
無(wú)需寫(xiě)SQL語(yǔ)句,而且調(diào)用父欄目時(shí)不需要按原來(lái)SQL調(diào)用寫(xiě)全所有終極欄目ID,更簡(jiǎn)單更方便。
例子2:按DIGG頂數(shù)降序顯示新聞信息
6.0以前版本要使用SQL調(diào)用,如下:
[e:loop={"select * from phome_ecms_news where checked=1 order by diggtop desc limit 10",10,24,0}]
<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a><br>
[/e:loop]
而6.5版本用下面就可以實(shí)現(xiàn)上面效果:
[e:loop={'news',10,18,0,'','diggtop desc'}]
<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a><br>
[/e:loop]
還支持多字段排序,比如:'istop desc,id desc,title desc'






