织梦dedecms系统tag显示每个tag相應的文章数量
这就需要修改/include/taglib/tag.lib.php这个文件,找到第VIIIVII行左右的
复制代码
$row[lin
更多精彩就在: 51免费论文网|www.jxszl.com
k]=$cfg_cmsurl."/tags.php?/".urlencode($row[keyword])."/";‘
在这行的下面添加如下代码:
$count=$dsql->GetOne("Selectcount(tid)From`dede_taglist`wheretag=".$row[tag]."");
$row[count]=$count[count(tid)];
添加好后就可以通过[field:count/]来获取当前tag标签关联的文章数量了,例如:
复制代码
{dede:tagsort=hotgetall=II}
原文链接:http://www.jxszl.com/biancheng/dedecms/75522.html
热门阅读