打开/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={content:keywords}即可// 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) . "'";
}
}
}
}
调用代码如下:
{pboot:list scode=2 num=4 tags={content:keywords}}
{/pboot:list}