Skip to content

Commit

Permalink
Added a new section to the page templating/global_vars using a EVList…
Browse files Browse the repository at this point in the history
…ener
  • Loading branch information
piet authored and wouterj committed Aug 11, 2016
1 parent b265132 commit ef1c2fd
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions templating/global_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,4 @@ This should feel familiar, as it's the same syntax you use in service configurat
'globals' => array(
'user_management' => '@app.user_management',
),
));
Using a Twig Extension
----------------------

If the global variable you want to set is more complicated - say an object -
then you won't be able to use the above method. Instead, you'll need to create
a :ref:`Twig Extension <reference-dic-tags-twig-extension>` and return the
global variable as one of the entries in the ``getGlobals`` method.
));

0 comments on commit ef1c2fd

Please sign in to comment.