【问题标题】:How to set noindex and nofollow metas in symfony framework?如何在 symfony 框架中设置 noindex 和 nofollow 元数据?
【发布时间】:2012-05-09 13:33:14
【问题描述】:

我使用的是 symfony 1.0.6,站点结构如下;

应用程序/前端/模块/自定义页面

我想为 custompages 模块的页面设置“noindex 和 nofollow”元数据。

我尝试如下给予:

metas:
  robots: noindex,nofollow

但它不起作用。

请帮忙...!

【问题讨论】:

  • 假设您清除了缓存?此外,请确保模块中没有 view.yml 会覆盖应用配置中的默认 view.yml。
  • 模块中有一个view.yml。我的模块名称是“custompages”,我在 custompages/config/view.yml 中添加了元数据。不对吗?

标签: symfony1 metadata robot nofollow noindex


【解决方案1】:

您不会忘记 view.yml 文件中的父“默认”容器吗?

default:
  metas:
    robots: noindex,nofollow

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-11-30
    • 2019-02-15
    • 2010-11-13
    • 2018-01-29
    • 1970-01-01
    • 1970-01-01
    • 2020-01-16
    • 1970-01-01
    相关资源
    最近更新 更多