欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

织梦目arclist调用副栏目多个,不显示的解决办法

程序员文章站 2022-05-25 21:32:27
...

打开/include/taglib/arclist.lib.php,代码约位于295-296行,查找以下两行代码:

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

将其替换成以下代码:

$vicewheres = "";        
                    $typeids = explode(",",GetSonIds($typeid));        
                    $crossids = explode(",",$CrossID);        
                    $typeidss = array_merge($typeids,$crossids);        
                    $typeidss = array_unique($typeidss);        
                    foreach($typeidss as $tid){        
                        $liketypeid2 = ",".$tid.",";        
                        $vicewheres.= " or CONCAT(',',arc.typeid2,',') like '%$liketypeid2%' ";        
                    }        
                    if($CrossID==''){        
                        if($vicewheres!="")        
                            $orwheres[] = ' (arc.typeid in ('.GetSonIds($typeid).') '.$vicewheres.') ';        
                        else        
                            $orwheres[] = ' arc.typeid in ('.GetSonIds($typeid).') ';        
                    }else{        
                        if($vicewheres!="")        
                            $orwheres[] = ' (arc.typeid in ('.GetSonIds($typeid).','.$CrossID.') '.$vicewheres.') ';        
                        else        
                            $orwheres[] = ' arc.typeid in ('.GetSonIds($typeid).','.$CrossID.') ';        
                    }    

继续找到262行, $orwheres[] = " arc.typeid IN ($typeid) "; 

替换

$vicewheres = "";        
               foreach($typeid as $tid){        
                $liketypeid2 = ",".$tid.",";        
                   $vicewheres.= " or CONCAT(',',arc.typeid2,',') like '%$liketypeid2%' ";        
               }        
            if($vicewheres!="")        
                $orwheres[] = " (arc.typeid in ($typeid) $vicewheres) ";        
            else        
                $orwheres[] = " arc.typeid in ($typeid) ";   

 

相关标签: DEDE