Dedecms标签artlist调用副栏目方法

作者: jiukeshuju 分类: DEDECMS 发布时间: 2020-10-02 14:26


解决在列表页调用副栏目,但列表页文章不显示方法:

打开 /include/taglib/arclist.lib.php,原代码如下:

if($CrossID==”) $orwheres[] = ‘ arc.typeid IN (‘.GetSonIds($typeid).’)’;
else $orwheres[] = ‘ arc.typeid IN (‘.GetSonIds($typeid).’,’.$CrossID.’)’;

将其替换成如下代码:

if($CrossID==”)
$orwheres[] = ” (arc.typeid in (“.GetSonIds($typeid).”) or arc.typeid2 in (“.GetSonIds($typeid).”) or CONCAT( ‘,’, arc.typeid2, ‘,’ ) LIKE ‘%,”.$typeid.”,%’ )”;
else
$orwheres[] = ” (arc.typeid in (“.GetSonIds($typeid).”,”.$CrossID.”) or arc.typeid2 in (“.GetSonIds($typeid).”,”.$CrossID.”) or CONCAT( ‘,’, arc.typeid2, ‘,’ ) LIKE ‘%,”.$typeid.”,%’)”;

 

如果觉得我的文章对您有用,请随意赞赏。您的支持将鼓励我继续创作!