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

织梦dedecms用栏目交叉时arclist标签不能调出相关文章,第1张

织梦dedecms用栏目交叉时arclist标签不能调出相关文章 打开 include/taglib/arclist.lib.php 文件
找到
if($ctag->GetAtt('cross')=='1')
修改为
if($ctag->GetAtt('cross')!='0')
找到
if($arr['crossid']!='') $selquery = "Select id,topid From `dede_arctype` where id in('{$arr['crossid']}') And id<>'{$typeid}' And topid<>'{$typeid}'  ";
修改为
if($arr['crossid']!='') $selquery = "Select id,topid From `dede_arctype` where id in({$arr['crossid']}) And id<>'{$typeid}' And topid<>'{$typeid}'  ";

分析:
从数据库可以看出
当栏目为不交叉时cross的值为0
当栏目为自动获取同名栏目时cross的值为1
当栏目为手动指定ID时cross的值为2
显然
if($ctag->GetAtt('cross')=='1')
是错的,在手动指定ID时$CrossID 始终为空 。(

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/zaji/3007487.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-09-27
下一篇2022-09-27

发表评论

登录后才能评论

评论列表(0条)

    保存