dedecms channel调用栏目的描述

{dede:channel type=’top’}[field:description/]{/dede:channel}channel 这个标签没有description属性你需要自己把这个属性开启。到你的程序目录include\taglib 找到 channel.lib.php修改一下文件如果你想查找所有top最顶层的栏目内容的话修改if($type==’top’) {$sql = "SELECTid,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,descriptionFrom `dede_arctype` WHERE reid=0 Andishidden<>1 order by sortrank asclimit 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’];然后在你的标签就可以调用了。就这么简单如果想调用其它的都一样。只需要开启就可以了 车到山前必有路,没路可以先开路,开路就得有乐观,

dedecms channel调用栏目的描述

相关文章:

你感兴趣的文章:

标签云: