如何修改织梦搜索页面的代码,加入其他标签:
找到织梦目录下面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");
- require_once(DEDEINC."/taglib/myad.lib.php");
- //xiariboke.com
- require_once(DEDEINC."/taglib/php.lib.php");
- require_once(DEDEINC."/taglib/sql.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));
- }
- else if($tagname=="myad")
- {
- $this->dtp->Assign($tagid,lib_myad($ctag,$this));
- }
- else if($tagname=="php")
- {
- $this->dtp->Assign($tagid,lib_php($ctag,$this));
- }
- else if($tagname=="sql")
- {
- $this->dtp->Assign($tagid,lib_sql($ctag,$this));
- }
然后,织梦搜索页面就支持多种标签了。
{dede:arclist}、 {dede: channelartlist }、{dede: myad }、{dede: php }、{dede: sql }