阿里云市场

阿里云资讯,阿里云服务器,阿里云免费备案,阿里云代维,阿里云相关问题解决QQ332465082

博客园 首页 新随笔 联系 订阅 管理

{dede:channel type='top'} [field:description/] {/dede:channel}

 

channel 这个标签没有description属性你需要自己把这个属性开启。

到你的程序目录include\taglib 找到 channel.lib.php 修改一下文件

如果你想查找所有top最顶层的栏目内容的话修改

 if($type=='top') { $sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description From `#@__arctype` WHERE reid=0 And ishidden<>1 order by sortrank asc limit 0, $line "; }

数据库后面添加一个字段description

 $row['description']=$row['description'];//这个就是新添加的内容

$row['typelink'] = $row['typeurl'] = GetOneTypeUrlA($row); if(is_array($dtp2->CTags)) { foreach($dtp2->CTags as $tagid=>$ctag) { if(isset($row[$ctag->GetName()])) $dtp2->Assign($tagid,$row[$ctag->GetName()]); } } $likeType .= $dtp2->GetResult();

找到这段在前面添加一条

$row['description']=$row['description'];

然后在你的标签就可以调用了。

就这么简单如果想调用其它的都一样。只需要开启就可以了。

posted on 2015-11-03 10:45  阿里云服务商  阅读(318)  评论(0编辑  收藏  举报