php - 未检索到 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} 呢?
这些都不起作用。
解决方案
您无需触摸 header.inc.php,您使用的是 CMS Made Simple,而不是 CMS Made 困难 :)。
转到“站点管理 > 设置 - 全局设置 > 常规设置选项卡 > 全局元数据”,在其中添加所有标签并将 smarty 标签 {metadata} 放入页面模板中。
更多详细信息:https ://docs.cmsmadesimple.org/configuration/global-settings
希望有帮助。PS 在 Slack 频道上也有大量快速建议。
推荐阅读
- android - 使用 Recyclerview 中的 itemTouchHelper 在 cardview 上拖动高程翻译
- angular - 未检测到匹配的服务人员
- xml - 如何使用 XSLT 在 XML 节点中添加和删除项目
- android - Android 将 editText 的文本换行,该文本恰好在 textView 的右侧对齐
- angular - 我怎样才能获得我选择的选项的更多数据?
- kotlin - 从通知中获取特征 gatt
- c++ - C++重载函数,一个接受基类的参数,另一个接受派生类的参数
- regex - 用于捕获 CSV 字段中的行终止符的正则表达式
- azure - 适用于 Linux VM 的 Azure 磁盘加密
- sql - SQLite:结合“WHERE”条件