POST TIME:2020-04-02 13:46
默認(rèn)情況下,織夢cms模板的搜索結(jié)果頁面模板是不能調(diào)用dedecms標(biāo)簽的,那么如何讓織夢cms的搜索頁面支持標(biāo)簽調(diào)用呢?
修改步驟如下:
dedecms模板搜索頁search.php支持arclist和channelartlist標(biāo)簽調(diào)用方法
打開include/arc.searchview.class.php
查找
require_once(DEDEINC.”/taglib/hotwords.lib.php”); require_once(DEDEINC.”/taglib/channel.lib.php”); |
下面插入
require_once(DEDEINC.”/taglib/arclist.lib.php”); require_once(DEDEINC.”/taglib/channelartlist.lib.php”); |
查找
else if($tagname==”hotwords”) { $this->dtp->Assign($tagid,lib_hotwords($ctag,$this)); } |
下面插入
else if($tagname==”arclist”) { $this->dtp->Assign($tagid,lib_arclist($ctag,$this)); } else if($tagname==”channelartlist”) { $this->dtp->Assign($tagid,lib_channelartlist($ctag,$this)); } |
到這一步就OK了,如何還需要實(shí)現(xiàn)定義字段調(diào)用的話那么就繼續(xù):修改 include/arc.searchview.class.php
找到
$query = "Select |
整行修改為:
$query = "Select addon.*,arc.*,act.typedir,act.typename,act.isdefault,act.defaultname,act.namerule, act.namerule2,act.ispart,act.moresite,act.siteurl,act.sitepath from `{$this->AddTable}` arc left join `dede_arctype` act on arc.typeid=act.id left join `dede_addonarticle` addon on addon.aid=arc.id where {$this->AddSql} $ordersql limit $limitstart,$row"; |
這樣織夢dedecms模板搜索頁search.php就支持arclist和channelartlist標(biāo)簽的調(diào)用了。