不知道为啥,帝国CMS搜索模板始终不支持动态标签调用,这很不方便,即便是升级到7.2,仍然不支持。
这篇文章成功实现了7.2版的搜索模板动态标签
教程开始
打开 /e/search/result/index.php 文件
查找:
1
|
require ( "../../class/connect.php" ); require ( "../../class/db_sql.php" ); require ( "../../data/dbcache/class.php" ); require ( "../../class/q_functions.php" ); require "../" .LoadLang( "pub/fun.php" ); |
修改成:
1
|
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" ); |
接着查找:
1
|
//替换公共模板变量$listtemp=$tempr[temptext]; |
在上面添加以下代码:
1
|
//页面支持标签$tempr[temptext]=DtNewsBq('list'.$tempid,$tempr[temptext],0); |
就可以了!