AB模板网:是一家专注于网站模板,织梦模板下载的网站,专注网站源码,源码下载,dede模板,为广大站长提供网站模板和织梦模板等素材.
用户名:
密码:
注册

织梦源码,模板王

VIP

织梦dedecms如何在channel标签中调用栏目描述[field:description/]

www.adminbuy.cc / 2019-09-20
只要在 include aglibchannel.lib.php   
 
找到下面黑色代码,加入下面红色代码  description,即可
 
位置在78行
 
 if($type=="top")
    {
        $sql = "SELECT id,typename, description,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
          From `dede_arctype` WHERE reid=0 And ishidden<>1 order by sortrank asc limit 0, $line ";
    }
    else if($type=="son")
    {
        if($typeid==0) return "";
        $sql = "SELECT id,typename, description,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
          From `dede_arctype` WHERE reid="$typeid" And ishidden<>1 order by sortrank asc limit 0, $line ";
    }
    else if($type=="self")
    {
        if($reid==0) return "";
        $sql = "SELECT id,typename, description,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
            FROM `dede_arctype` WHERE reid="$reid" And ishidden<>1 order by sortrank asc limit 0, $line ";
    }

然后即可调用:
例如:
{dede:channel type="son" typeid="21"}
<p>[field:description/]</p>
{/dede:channel}