您的位置:首页 > 帝国cms教程

帝国cms调用当前页面tags标签和内容页面tags方法

2021-10-13 09:36:32 帝国cms教程 166

帝国cms调用当前页面列表tags标签方法

[e:loop={"select a.* from yisvip__enewstags a LEFT JOIN yisvip__enewstagsdata b ON a.tagid=b.tagid where b.classid='".$GLOBALS[navclassid]."' and a.isgood!='1' group by a.tagid order by a.num DESC limit 20",500,24,0}]
          <a target="_blank" href="/tags/<?=$bqr['tagid']?>.html"><?=$bqr['tagname']?></a>
    [/e:loop]

内容页面

本文标签:[e:loop={"select * from [!db.pre!]ecms_news_data_1 where id = '".$navinfor[id]."' limit 0,30",1,24,0}]
<?
$a="$bqr[infotags]";
$str=str_replace(',', ',', $a);
$tag='';
$t= explode(",", $str);
for($i=0;$i<count($t);$i++)
{ 
if($t[$i])
{
$rr=$empire->fetch1("select tagid from {$dbtbpre}enewstags where tagname='$t[$i]' limit 1");
$tagslink="/tags-".$rr[tagid].".html";
$tag.="<a href='$tagslink' target='_blank'>".$t[$i]."</a> ";
}
}
echo $tag;
?>
[/e:loop]
本文专题:
[e:loop={'select ztid from yisvip__enewsztinfo where classid='.$navinfor[classid].' and id='.$navinfor[id],10,24,0}] <a target="_blank" href="/<?=$class_zr[$bqr[ztid]][ztpath]?>"><?=$class_zr[$bqr[ztid]][ztname]?></a>[/e:loop]

 

 

 

相关推荐