帝国CMS灵动标签调用包含指定关键词关键字文章
用灵动标签调用包含指定的关键词,和关键字的文章呢?其实实现的方法不难,以下是调用方法:
指定关键词调用:
[e:loop={"select * from {$dbtbpre}ecms_news where title like '%这里是指定的关键词%' and checked=1 order by newstime desc limit 10",10,24,0}] " target="_blank">=$bqr[title]?>
[/e:loop]
指定短语调用:
[e:loop={'news',10,18,0,"title like '%这里是关键词%'",''}] " target="_blank">=$bqr[title]?>
[/e:loop]
分享一个自己用的例子:
[e:loop={"select * from {$dbtbpre}ecms_news where title like '%这里是关键词%' and classid=5 order by newstime desc limit 3",10,24,0}] [/e:loop]快去试试吧!