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

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -