I read the code for the Session helper, and this behaviour is correct. The div 
does inherit its id from the key, so you can't place css against the id of the 
div in a generic way (unless you want to add a style for each potential id). I 
have made the styles completely class based.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 23 Sep 2010, at 03:53, Jeremy Burns wrote:

> According to the guide, if I do this:
> 
> $this->Session->setFlash('A message.', 'default', array('class' =>
> 'warning'), 'reset_password');
> 
> ...and this in a view:
> 
> echo $this->Session->flash('reset_password');
> 
> ...I ought to get this:
> 
> <div id="flashMessage" class="warning">A message.</div>
> 
> ...but I am actually getting this:
> 
> <div id="reset_passwordMessage" class="warning">A message.</div>
> 
> In other words, instead of reading the message in the session key
> 'reset_password' it is applying the key to the id of the div. This
> makes applying CSS a bit tricky.
> 
> I can see the Session['Message']['reset_password'] key in the debug
> toolbar, so it is being set and it is not being cleared after flash
> has rendered it (like a normal setFlash message would be).
> 
> Am I doing something wrong?
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
  • setFlash and key Jeremy Burns
    • Re: setFlash and key Jeremy Burns | Class Outfit

Reply via email to