网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的考试资料:

 

标题 织梦(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始终为空
随便看

 

在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/17 21:05:29