On 22.11.2010, at 19:25, Jordi Boggiano wrote:

> On Mon, Nov 22, 2010 at 4:32 PM, Lukas Kahwe Smith <[email protected]> 
> wrote:
>> However in some cases you might prefer to show some flash messages closer to 
>> a specific form. In this case one would call hasFlash() followed by 
>> getFlash() to show the flash message in the given template. Since getFlash() 
>> by default removes the flash message it would not show up in a subsequent 
>> getFlashMessages() call.
> 
> In general I agree, but this is not entirely realistic. In most cases
> you'll want to use getFlashMessages early on, at the top of the page
> or something, to display all errors.
> 
> Given the way Twig handles output (in a one-pass top-down way, not a
> two-pass content-then-layout), getFlashMessages will be called before
> your form's hasFlash/getFlash would be.


ah .. i thought it renders the templates before it it renders the layout. or 
does it start with the layout and then works itself back up the chain?

regards,
Lukas Kahwe Smith
[email protected]



-- 
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

Reply via email to