Thanks!
As so often with cake the answer is so simple that you would never
think of trying it :)


On Jan 24, 4:16 pm, grigri <[EMAIL PROTECTED]> wrote:
> <?php
> if (is_array($messages = $session->read('Message'))) {
>   foreach (array_keys($messages) as $key) {
>     $session->flash($key);
>   }}
>
> ?>
>
> On Jan 24, 3:05 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > In version 1.2 the Session component uses dot-notation when creating
> > flash messages. Is there any way to loop through them?
>
> > I am guessing the answer is somewhere in the Set class but I haven't
> > been able to figure out how to do it.
>
> > A layout snippet:
>
> > if ($session->check('Message.flash')):
> >         $session->flash();
> > endif;
> > if ($session->check('Message.auth')):
> >         $session->flash('auth');
> > endif;
> > // and so on...
>
> > I want to be able to flash "all" messages. But when I start making up
> > my own keys this part of the layout will start to get ugly.
>
> > Anyone got the hang of this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to