# 帝国CMS搜索模板不支持灵动标签和万能标签的解决方法

*Published:* 2023-12-01
*Author:* 客服001

#### 温馨提醒

如果文章内容或图片资源失效，请留言反馈，我们会及时处理，谢谢

本文最后更新于2023年12月1日，已超过 180天没有更新



1、打开 /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");
```

2、再查找

//替换公共模板变量

```
$listtemp=$tempr[temptext];
```

在上面添加如下代码

//新增支持[灵动标签](https://www.xarjtc.com/tag/%e7%81%b5%e5%8a%a8%e6%a0%87%e7%ad%be "查看灵动标签此标签更多文章")和[万能标签](https://www.xarjtc.com/tag/%e4%b8%87%e8%83%bd%e6%a0%87%e7%ad%be "查看万能标签此标签更多文章")

```
$tempr[temptext]=DtNewsBq('list'.$tempid,$tempr[temptext],0);
```

修改完成，这样就可以在[搜索](https://www.xarjtc.com/tag/%e6%90%9c%e7%b4%a2 "查看搜索此标签更多文章")模板中灵活使用帝国CMS强大的灵动和万能标签了。