时间:2026-02-23 12:11:33

首页 / 攻略资讯 / 网站cms技术

帝国CMS首页通过loop标签调用TAGS的实现代码

帝国CMS首页通过loop标签调用TAGS的实现代码

帝国CMS首页无法调用TAGS,但是本人整理了一段可以使用的代码分享给大家。

[e:loop={0,13,3,0}] ?php$fr=$empire- fetch1( select infotags from diansui_ecms_news_data_1 where id='$bqr[id]' );? ?php$alltag= ;$tag=explode( , ,$fr[infotags]);for($t=0;$t count($tag);$t++){$alltag.=' a href= /tags-'.urlencode($tag[$t]).'-0.html '.$tag[$t].' /a ';}? ?phpif($bqr[titlepic]){? li class='clearfix' span class='fl' a href=' ?=$bqsr['titleurl']? ' target='_blank' rel='nofollow' img src=' ?=$bqr['titlepic']? ' alt=' ?=$bqr['title']? ' / /a /span h3 a href=' ?=$bqsr['titleurl']? ' title=' ?=$bqr['title']? ' target='_blank' ?=$bqr['title']? /a /h3 p ?=$bqr['smalltext']? ... a href=' ?=$bqsr['titleurl']? ' title='更多' target='_blank' [更多] /a /p div class='mn-lis-tit' span class='mn-date' ?=date('Y-m-d',$bqr[newstime])? /span span class='mn-category ml25' 类目: a href=' ?=$bqsr[classurl]? ' ?=$bqsr[classname]? /a /span span class='mn-keyword ml25' 关键词: ?=$alltag? /span /div /li ?php}else{? li class='clearfix border' h3 a href=' ?=$bqsr['titleurl']? ' title=' ?=$bqr['title']? ' target='_blank' ?=$bqr['title']? /a /h3 p ?=$bqr['smalltext']? ... a href=' ?=$bqsr['titleurl']? ' title='更多' target='_blank' [更多] /a /p div class='mn-lis-tit' span class='mn-date' ?=date('Y-m-d',$bqr[newstime])? /span span class='mn-category ml25' 类目: a href=' ?=$bqsr[classurl]? ' ?=$bqsr[classname]? /a /span span class='mn-keyword ml25' 关键词: ?=$alltag? /span /div /li ?php}? [/e:loop]

大家根据自己的需要修改代码结构与样式即可。

帝国CMS首页通过loop标签调用TAGS的实现代码

系列软件