I want to add a media-field to the menus settings to pick an image for each menu item and output this as open graph images. I see two options:
- I add the field to the tab "Metadata" which then will be outputted via
\libraries\src\Document\Renderer\Html\HeadRenderer.php
. But i do not know where i can add fields to that tab. - I add the field in my custom (category blog) layout xml-file and then somehow get it in my template index.php but i do not know how to get access to the field there and documentation says:
"Note that if you add new parameters, these can be used in the layout file but will not be used in the core model or view files."
Would i somehow have to put my field in the layout file to use it in my index.php?