实例分析:
{dede:channel type ='son' typeid ='3'}
<div class="www.dedecom.cn">
<h2>[field:typename/]</h2>
<h3>[field:description/]</h3>
<h4>[field:keywords/]</h4>
</div>
{/dede:channel}
CMS集中营站长想通过dede:channel标签调用子栏目描述description及关键词keywords,但默认情况是调用不出来的,怎么办?看下边的解决方法。
解决方法:
打开 include aglibchannel.lib.php 文件,找到
else if($type=='son')
{
if($typeid==0) return '';
$sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
From `dedecom_arctype` WHERE reid='$typeid' And ishidden<>1 order by sortrank asc limit 0, $line ";
}
在上边代码中添加如下红色代码即可
else if($type=='son')
{
if($typeid==0) return '';
$sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description,keywords
From `dedecom_arctype` WHERE reid='$typeid' And ishidden<>1 order by sortrank asc limit 0, $line ";
}