织梦CMS标签显示相應数量教程
织梦CMS标签显示相应数量教程
这就需要修改/include/taglib/tag.lib.php这个文件,找到第VIIIVII
更多精彩就在: 51免费论文网|www.jxszl.com
行左右的$row[link]=$cfg_cmsurl."/tags.php?/".urlencode($row[keyword])."/";‘
在这行的下面添加如下代码:
$count=$dsql->GetOne("Selectcount(tid)From`dede_taglist`wheretag=".$row[tag]."");$row[count]=$count[count(tid)];
$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/74908.html
热门阅读