首页 > 解决方案 > 未检索到 CMSMS 元标记

问题描述

我用 CMSMS 建立了一个网站。我在检索元标记时遇到问题。我认为这需要在 header.inc.php 文件中完成。截至目前,内容的元标记为空。

<meta name="description" content="">

根据我在网上找到的一些文件,我需要把

<meta name="description" content="{content}"> 

但这只是在标记中按字面意思输出。什么是正确的方法?

<meta name="description" content="{$content}"> 
<meta name="description" content={content}> 
<meta name="description" content="<?php $content ?>"> 
<meta name="description" content="<?php echo $content ?>"> 

{keywords} 呢?

这些都不起作用。

标签: phpcontent-management-systemcmsmadesimple

解决方案


您无需触摸 header.inc.php,您使用的是 CMS Made Simple,而不是 CMS Made 困难 :)。

转到“站点管理 > 设置 - 全局设置 > 常规设置选项卡 > 全局元数据”,在其中添加所有标签并将 smarty 标签 {metadata} 放入页面模板中。

更多详细信息:https ://docs.cmsmadesimple.org/configuration/global-settings

希望有帮助。PS 在 Slack 频道上也有大量快速建议。


推荐阅读