DedeCMS织梦系统head.htm里没法调用栏目描述

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

 

channel 这个标签没有description属性你须要本身把这个属性开启。sql

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

若是你想查找全部top最顶层的栏目内容的话修改url

 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 "; }spa

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

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

$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();io

找到这段在前面添加一条foreach

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

而后在你的标签就能够调用了。channel

就这么简单若是想调用其它的都同样。只须要开启就能够了。

相关文章
相关标签/搜索