symfony - How can I access parameters defined in parameters.yml from within a twig template? -


i'm using symfony2.

how can access parameters defined in parameters.yml within twig template ?

thanks.

define in config.yml this:

twig:     globals:         some_key: %some_key% 

and use in twig files like:

{{ some_key }} 

for security reasons can't access data parameters.yml in templates without defining global twig variables.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -