易优eyoucms您现在的位置是:主页 > 易优eyoucms >

eyoucms调取当前tag列表页面的文档总数及点击数

2023-01-11 13:18:29易优eyoucms 32人已围观

效果如图所示

修改文件

/application/home/controller/Tags.php

找到如下代码(大概在130行左右):

'litpic'   => !empty($tagindexInfo['litpic']) ? handle_subdir_pic($tagindexInfo['litpic']) : $tagindexInfo['litpic'],
在此代码下方添加代码
'tagcount'   => !empty($tagindexInfo['count']) ? $tagindexInfo['count'] : $tagindexInfo['count'],
'tagtotal'   => !empty($tagindexInfo['total']) ? $tagindexInfo['total'] : $tagindexInfo['total'],

模板调取标签

{$eyou.field.tagtotal}
{$eyou.field.tagcount}