帝国cms内容模板sql语句方式调用当前TAG标签的具体方式

调用当前TAG标签

内容模板用sql语句的方式调用当前tags标签
在内容模板需要调用的区域输入代码,具体样式根据自己的CSS;
具体调用代码如下:


fetch1("select infotags from {$dbtbpre}ecms_news_data_{$navinfor[stb]} where id=$navinfor[id]");
$infotags=$fr[infotags];//这个就是infotags字段内容
$tag=;
$t=explode(,,$infotags);//去逗号
$d=count($t);
    for($i=0;$i<count($t);$i++)
    {
            if($t[$i])
            {
                    $tagslink="!--news.url--]e/tags/?tagname=".urlencode($t[$i])."&tempid=1";
                   $tag.="".$t[$i]." ";
            }
}
echo $tag;
?>   

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注