如何在symfony框架中设置noindex和nofollow元数据?

问题描述 投票:0回答:1

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

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

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

我尝试给予如下:

metas:
  robots: noindex,nofollow

但是它不起作用。

symfony1 meta-tags nofollow noindex
1个回答
0
投票

您是否忘记了 view.yml 文件中的父“默认”容器?

default:
  metas:
    robots: noindex,nofollow
© www.soinside.com 2019 - 2024. All rights reserved.