On 11 Jan 2011, at 15:36, Fabien Potencier wrote:
> Some days ago, I've added support for global variables in Twig, and so some
> global variables are now made available in templates, like 'request',
> 'session', and 'user'.
[...]
> So, the question is, which one do you prefer (keep it like it is, prefix, or
> global object)? And if you like option 2 and 3 better, which prefix/name do
> you think is best?
>
> My personal preference goes to solution 3 with 'app' as a name for the global
> object (which is by the way what people suggested in the comments of the
> commit).
Personally I'd go for {{ sf.user.username }} rather than {{ app.user.username
}}, but either's good. :)
-- Matt
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en