Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top