-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a new section to the page templating/global_vars using a EVListener #6794
Conversation
Ok, if anyone wants to help me out on this syntax error please.. I see no problems. |
|
||
If you're using the `@Template`_ annotation from `SensioFrameworkExtraBundle`_ you can hook | ||
into ``kernel.view`` right before the template listener kicks in, take a look at the | ||
dedicated page about :doc:`Event Listeners </event_dispatcher.html>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax error is caused by the underscore at the end of the :doc: link.
Something like this is fine:
page about :doc:`/event_dispatcher`.
👍 Status: Reviewed Thanks @appeltaert |
done, thanks @snoek09 |
Hey @appeltaert! Thanks for opening this. Unfortunately, I don't like the solution - because it won't work for most people (and even for people that use But, you're 100% right that getGlobals() is deprecated and so we need to stop recommending it! I think we should just remove this entire Could you make that change? Thanks! |
Status: Needs Work |
@weaverryan looking at it that way i agree, ill keep that in mind for future contribs. something like this has more legitimacy for stackoverflow. sure, ill do the change |
👍 Status: Reviewed |
Thanks for keeping the docs in sync with latest Twig changes Piet! It's now merged into the 2.7 version (I'll merge it into newer versions from there) |
…ing a EVListener (piet, Piet Bijl) This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #6794). Discussion ---------- Added a new section to the page templating/global_vars using a EVListener Added another option for injecting variables into templates through the use of a event listener, also added a DC/removal notice on twigs getGlobals Commits ------- ef1c2fd Added a new section to the page templating/global_vars using a EVListener
Added another option for injecting variables into templates through the use of a event listener, also added a DC/removal notice on twigs getGlobals