{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'];
然后在你的標簽就可以調用了。
就這么簡單如果想調用其它的都一樣。只需要開啟就可以了。
浙公網安備 33010602011771號