首页 > 教程 >
织梦dedecms用栏目交叉时arclist标签不能调出相关文章
2023-02-26教程围观次
简介打开include/taglib/arclist.lib.php文件找到if($ctag->GetAtt('cross')=='1')修改为if($ctag->GetAtt('cross')!='0')找到if($arr['crossid']!='')$selquery="Selectid,topidFrom`dede_arctype`whereidin('{$arr['crossid']}')A
打开 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 始终为空 。(
找到
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 始终为空 。(
下载链接:网站源码/小程序源码/网站模板下载
下载排行
最新发布
-
最新去水印小程序源码分享/无需后台/对接接口/支持全网去水印功能
-
群多多社群人脉H5-2.1.4多开插件+小程序独立前端+搭建教程
-
七夕情侣飞行棋游戏限定版本源码/解锁版
-
苹果CMS海螺模版V20修复版/加广告代码
-
宠物社区风格 商业版(GBK)Discuz模板
-
全新UI基于Thinkphp的最新自助打印系统/云打印小程序源码/附教程
-
易优CMS家纺家居装饰类网站模板/EyouCMS家具家居类企业网站模板
-
EyouCMS艺术***摄影工作室网站模板/易优CMS摄影工作室网站模板
-
易优CMS响应式精品茶具实木茶盘销售网站模板/EyouCMS响应式酒水饮料类企业网站模板
-
EyouCMS响应式推土机挖掘机机械类网站模板/易优CMS机械设备类企业网站模板