标题 | 织梦(dede)arclist标签调用交叉栏目时调不出来 |
内容 | 最近用了交叉栏目,发现当为手动指定交叉栏目ID时用arclist标签不能调出相关文章 最后发现是 arclist标签有问题 要修改的地方是: include/taglib/arclist.lib.php 找到如下: if($ctag->GetAtt('cross')=='1') 改为 if($ctag->GetAtt('cross')!='0') 再找: if($arr['crossid']!='') $selquery = "Select id,topid ` where id in('{$arr['crossid']}') Andid<>'{$typeid}' Andtopid<>'{$typeid}' "; 改为: if($arr['crossid']!='') $selquery = "Select id,topid ` where id in({$arr['crossid']}) Andid<>'{$typeid}' Andtopid<>'{$typeid}' "; (这一行只去了一对单引号,应该是程序员手误多出来了) 就可以了 分析: 从数据库可以看出 当栏目为不交叉时cross的值为0 当栏目为自动获取同名栏目时cross的值为1 当栏目为手动指定ID时cross的值为2 显然if($ctag->GetAtt('cross')=='1')是错的,在手动指定ID时$CrossID始终为空 |
随便看 |
|
在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。