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.

有帮助吗?

解决方案

If you return an \Ip\Response\Layout object in your controller, you can use methods like ->setKeywords(), ->setDescription() ...

If you simply return a string leaving the layout to be generated by ImpressPages, you can add a filter which would add required meta information before outputing it. Here is an example that sets favicon https://github.com/impresspages-plugins/Favicon/blob/master/Filter.php

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top