I'm trying to use a snippet to store a contact address meant to be displayed in the footer of every page.
Following the doc (https://docs.sulu.io/en/2.3/cookbook/default-snippets.html), I created a snippet template named address
in config/templates/snippets/address.xml
and defined an area in this file, like this :
<areas>
<area key="footer_address">
<meta>
<title lang="fr">Adresse dans le pied de page</title>
</meta>
</area>
</areas>
I created a snippet from this template in the admin area and assigned it in the "Default snippet" tab.
But when I try to load this snippet with sulu_snippet_load_by_area('footer_address')
. I get the following error :
An exception has been thrown during the rendering of a template ("You have requested a non-existent parameter "footer_address".").
If I don't assign the snippet from the admin area, the twig function does not throw an error, but return null
.
I must be doing something wrong, but I can't see what :/