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
Post a Comment