Using key is fine, but what I dont want to use is this:
$session->flash('warning');
In default.ctp, I want it to output message itself with the different
CSS for different types of messages using $session->flash();
For that I need to change a bit of SessionHelper::flash()
On May 31, 3:12 am, francky06l <[EMAIL PROTECTED]> wrote:
> You can use the 4th parameter of session component to set a key on
> your message:
>
> $this->Session->setFlash("message", 'default', array(), 'warning');
> $this->Session->setFlash("message", 'default', array(), 'error');
>
> and then in view, you can get the message with a "key" (default:
> "flash", and Auth component uses 'auth'):
>
> $session->flash('warning');
> $session->flash('error');
>
> hth
>
> On May 31, 12:04 am, Abhimanyu Grover <[EMAIL PROTECTED]> wrote:
>
> > Hi Guys,
>
> > I'm writing a reusable CMS. I'm stuck at some problem, which I believe
> > is easy to figure out...
>
> > I want to overwrite a function SessionHelper::flash() what would be
> > the easiest way to do so?
> > Basically, I'm adding different types of message support to it:
> > success / error / warning.
>
> > Looking forward to your response... (cant find it anywhere)
>
> > Thanks,
> > Abhimanyu Grover
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---