打开/apps/home/controller/ParserController.php文件
找到
// tags数据参数筛选$where2 = array();if ($tags) { $tags_arr = explode(',', $tags); foreach ($tags_arr as $value) { if ($value) { if ($fuzzy) { $where2[] = "a.tags like '%" . escape_string($value) . "%'"; } else { $where2[] = "a.tags='" . escape_string($value) . "'"; } } }}
改为
// tags数据参数筛选$where2 = array();if ($tags) { $tags_arr = explode(',', $tags); foreach ($tags_arr as $value) { if ($value) { if ($fuzzy) { $where2[] = "a.keywords like '%" . escape_string($value) . "%'"; } else { $where2[] = "a.keywords='" . escape_string($value) . "'"; } } }}
在详情页里列表调用代码参考以下,增加tags={content:keywords}即可
调用代码如下:
{pboot:list scode=2 num=4 tags={content:keywords}}<a href="[list:link]"><img src="[list:ico]" alt="[list:title]" /></a>{/pboot:list}