dede搜索页面上某些标签无法使用

时间:2022-02-22 07:45:05
dede默认的搜索模板是search.htm,但在模板文件中使用{dede:type}{/dede:type}或{dede:flink}{/dede:flink}时,发现标签并没有被解析,显示为空。

解决方法如下:
1.在dede安装目录下的include目录下找到arc.searchview.class.php,
在其require_once(DEDEINC."/taglib/hotwords.lib.php");后加上你想要能被解析的标签库文件。
如:
require_once(DEDEINC."/taglib/type.lib.php");
require_once(DEDEINC."/taglib/flink.lib.php"); 2.然后在搜索$tagname=="hotwords"这个,在其后加上你要支持的标签。
如:
else if($tagname=="type") {
$this->dtp->Assign($tagid,lib_type($ctag,$this));
}
else if($tagname=="flink") {
$this->dtp->Assign($tagid,lib_flink($ctag,$this));
}
这样在搜索模板中就支持type,flink这两个标签了。