需要修改/include/taglib/tag.lib.php这个文件,找到第87行左右的“$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/";‘
在这行的下面添加如下代码:
$count = $dsql->GetOne("Select count(tid) From `dede_taglist` where tag = '".$row['tag']."'");$row['count'] = $count['count(tid)'];
添加好后就可以通过[field:count/]来获取当前tag标签关联的文章数量了,例如:
{dede:tag sort='hot' getall='2'}