帝国CMS怎么用灵动标签调用包含指定的关键词或关键字
帝国CMS怎么用灵动标签调用包含指定的关键词,和关键字的文章呢?其实实现的方法不难,调用方法:指定关键词调用:[e:loop={"select * from phome_ecms_news where title like '%这里是指定的关键词%' and checked=1……
帝国CMS怎么用灵动标签调用包含指定的关键词,和关键字的文章呢?其实实现的方法不难,调用方法:
指定关键词调用:
[e:loop={"select * from phome_ecms_news where title like '%这里是指定的关键词%' and checked=1 order by newstime desc limit 10",10,24,0}]<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a><br>[/e:loop]
指定短语调用:
[e:loop={'news',10,18,0,"title like '%这里是关键词%'",''}]<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a><br>[/e:loop]
分享一个自己用的例子:
[e:loop={"select * from {$dbtbpre}ecms_news where title like '%这里是关键词%' and classid=5 order by newstime desc limit 3",10,24,0}]<div class="col-12"> <a href="<?=$bqsr['titleurl']?>"><img src="<?=$bqr[titlepic]?>" alt="<?=$bqr['title']?>" /></a> <a href="<?=$bqsr['titleurl']?>"><?=$bqr['title']?></a> </div>[/e:loop]
*****************************
OK!搞定了。
标签关键字关键词包含- 上一篇
帝国cms结合项分页代码在哪修改
帝国CMS结合项页面用 [!--show.listpage--]页码不是用的sys_ShowListMorePage 函数返回值。后来查找结合项用的函数是 /e/class/connect.php内的page1函数。所以帝国cms结合项分页代码在/e/class/connect.php修
- 下一篇
帝国二次开发不同会员组显示不同投稿字段
<?phpif(getcvar('mlgroupid')==1){?>会员组id=1时显示内容<?php}elseif(getcvar('mlgroupid')==2){?>会员组id=2时显示内容<?php}?>