{$typeid}Andtopid<>{$typeid}";

"景先生毕设|www.jxszl.com

织梦dedecms用栏目交叉时arclist标签不能调出相關文章

2022-10-29 16:31编辑: www.jxszl.com景先生毕设
打开include/taglib/arclist.lib.php文件
找到
if($ctag->GetAtt(cross)==I.)
修改为
if($ctag->GetAtt(cross)!=0)
找到
if($arr[crossid]!=)$selq

 更多精彩就在: 51免费论文网|www.jxszl.com 
uery="Selectid,topidFrom`dede_arctype`whereidin({$arr[crossid]})Andid<>{$typeid}Andtopid<>{$typeid}";
修改为
if($arr[crossid]!=)$selquery="Selectid,topidFrom`dede_arctype`whereidin({$arr[crossid]})Andid<>{$typeid}Andtopid<>{$typeid}";
分析:
数据库可以看出
当栏目为不交叉时cross的值为0
当栏目为自动获取同名栏目时cross的值为I.
当栏目为手动指定ID时cross的值为II
显然
if($ctag->GetAtt(cross)==I.)
是错的,在手动指定ID时$CrossID始终为空

原文链接:http://www.jxszl.com/biancheng/dedecms/75486.html