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

就這麼簡單若是想調用其它的都同樣。只須要開啓就能夠了。

相關文章
相關標籤/搜索