帝国cms如何把文章tags标签当做keywords关键字使用调用


帝国cms多图不同样式展示,
列表内容模板(list.var) (*)
代码:注意:一定要勾选 使用程序代码
帝国cms的文章tags标签当做keywords关键字使用调用
需求:每篇文章都有自己的tags,现在需要将每篇文章的keywords关键字位置调用该文章的tags标签,
<?
$tbname=$class_r[$navinfor['classid']]['tbname'];
$ftbname=$dbtbpre."ecms_".$tbname."_data_".$navinfor['stb'];
$hlt = $empire->fetch1("select infotags from {$ftbname} where id='$navinfor[id]'");
$a=$hlt[infotags];
$str=str_replace(',', ',', $a);
$tag='';
$t= explode(",", $str);
for($i=0;$i<count($t);$i++)
{
if($t[$i])
{ $datar=$empire->fetch1("select tagid from {$dbtbpre}enewstags where tagname='$t[$i]' limit 1");
$tag.=$t[$i].",";
}
}
?>
调用:
<meta name="keywords" content="<?php echo $tag; ?>"/>


上一篇:帝国cms万能调用指定栏目名称与url链接及别名标签

下一篇:帝国cms栏目分页返回第一页去掉index.html方法


关键字
Copyright © 2002-2019 测速网 https://www.inhv.cn/ 皖ICP备2023010105号 城市 地区 街道
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!
热门搜索