不知道為啥,帝國CMS搜索模板始終不支持動態標簽調用,這很不方便,即便是升級到7.2,仍然不支持。
一流資源網以前分享過一篇關于 帝國CMS7.0搜索模板支持動態標簽 的教程,點這里查看 ,
但不支持7.2版,目前網上還沒有關于帝國CMS7.2搜索模板支持動態標簽 的教程,
于是,參考 7.0的教程,對比文件修改,成功實現了7.2版的搜索模板動態標簽
打開 /e/search/result/index.php 文件
查找:
require("../../class/connect.php");require("../../class/db_sql.php");require("../../data/dbcache/class.php");require("../../class/q_functions.php");require "../".LoadLang("pub/fun.php");
修改成:
require('../../class/connect.php');require('../../class/db_sql.php');require('../../class/functions.php');require('../../class/t_functions.php');require('../../data/dbcache/class.php');require "../".LoadLang("pub/fun.php");
接著查找:
//替換公共模板變量$listtemp=$tempr[temptext];
在上面添加以下代碼:
//頁面支持標簽$tempr[temptext]=DtNewsBq('list'.$tempid,$tempr[temptext],0);
就可以了!
新聞熱點
疑難解答