1

Is there any way to set page-specific attributes for plugin in PublicController, like seo meta tags (title, description, keywords) or push it to breadcrumbs? I figured that I can easily set layout file for plugin, but can't go any deeper.

4

1 回答 1

1

如果您在控制器中返回 \Ip\Response\Layout 对象,则可以使用 ->setKeywords()、->setDescription() ...

如果您只是返回一个字符串,留下由 ImpressPages 生成的布局,您可以添加一个过滤器,该过滤器将在输出之前添加所需的元信息。这是一个设置 favicon 的示例https://github.com/impresspages-plugins/Favicon/blob/master/Filter.php

于 2014-05-06T11:49:10.923 回答