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

842 ℃

打开 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 始终为空

纯js实现文字无缝滚动(亲测有效)

数组相关运用

dede织梦模板嵌套调用与当前文章关键词相同的文

织梦文章添加字段填栏目id,内容页调用字段里的

织梦dede后台添加图集时弹出302提示 图片变红解决

标签: arclist, cross, ctag, getatt, id

上面是“织梦dedecms用栏目交叉时arclist标签不能调出相关文”的全面内容,想了解更多关于 织梦cms 内容,请继续关注web建站教程。

当前网址:https://m.ipkd.cn/webs_342.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

生活小工具

收录了万年历、老黄历、八字智能排盘等100+款小工具!生活小工具
如何在Git中暂存和恢复暂存中的文件?
php语法怎么将访问的XML文件直接转换成数组格式
百度echarts如何实现多条折线效果图
jquery新增删除可编辑表格
帝国cms手机wap模板中如何调用栏目的分类