DEDECMS5.1 Tag首页文章分类显示(2 位领导批示)

dedecms 在5.x版本新增加的 tag 标签.

在首页使用时只有row,sort与InnerText三个参数.而不能像arclist等标签一样可以用typeid参数按文章分类显示.

自己动手.修改了一下

打开 include/inc_arcpart_view.php 文件

首先找到第 222 行

1
2
3
4
5
6
}else if($tagname=="tag"){
    //自定义宏标签
    if(empty($typeid)) $typeid = $envTypeid;
    $this->dtp->Assign($tagid,
    $this->GetTags($ctag->GetAtt("row"),$ctag->GetAtt("sort"),$ctag->GetInnerText())
);

修改为:

1
2
3
4
5
6
7
}else if($tagname=="tag"){
    //自定义宏标签
    $typeid = trim($ctag->GetAtt("typeid"));
    if(empty($typeid)) $typeid = $envTypeid;
    $this->dtp->Assign($tagid,
    $this->GetTags($ctag->GetAtt("row"),$ctag->GetAtt("sort"),$ctag->GetInnerText(),$typeid)
);

全文阅读 »

Tags : , ,

随机显示的10篇日志

评论最多的10篇日志

浏览最多的10篇日志