本文转自:http://www.xinshou5.com/a/127.html
织梦列表页中不支持artlist这个标签,这样怎么调用副栏目?
想要在列表页调用副栏目,但是列表页不支持artlist这个标签,这样就不能调用副栏目,解决的方法:
打开 /include/taglib/arclist.lib.php,代码位于295——296行,原代码如下:
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.",%‘)";
按上述修改后 即可实现调用副栏目内容!
时间: 2024-10-27 01:39:41