# 织梦cms如何自定义输出热门搜索关键词

*Published:* 2023-09-07
*Author:* 客服001

#### 温馨提醒

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

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



后台-系统-基本参数-添加变量

- 变量名称 cfg\_hotkeys
- 变量类型 文本
- 参数说明 热门关键词
- 变量值 牛肉,排骨,番茄,芒果,香菇,玉米

前台模板标签调用

```
{dede:global.cfg_hotkeys runphp="yes"}
global $cfg_cmspath;
$hotkeys = explode(',',@me);
$result = '';
for($index=0;$index<count($hotkeys);$index++){
    $result .= "<a href='{$cfg_cmspath}/plus/search.php?keyword=".urlencode($hotkeys[$index])."'>".$hotkeys[$index]."</a> ";
}
@me = $result;
{/dede:global.cfg_hotkeys}
```