请问PbootCMS增添同tag标签文章数目显示(1)
- 修改
/APPs/home/controller/ParserController.php
文件,添加统计tag数量的功能。 - 在适当位置添加
$tagsArrSum = array_count_values(explode(',', $tags));
以统计每个tag的数量。 - 添加新的case语句处理tag数量的显示。
- 在模板中使用
{pboot:tags scode=6 target=tag}[tags:text]([tags:sum]){/pboot:tags}
显示tag及其对应的文章数量。
更新时间:2025-04-10 23:53:25
转载请注明原文链接:https://www.muzicopy.com/suibi/3941.html