Re: setFlash not displaying

2010-07-16 Thread Jeremy Burns | Class Outfit
Which version of Cake are you using?

There's no need to check for the presence of a message; -flash() takes care of 
that for you.

On 1.3:
echo $this-Session-flash();

On 1.2:
$this-Session-flash();

Jeremy Burns
Class Outfit

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

On 16 Jul 2010, at 05:58, StephenE wrote:

 
 Hello, newbie here.  I cannot get setFlash() to display a message on
 my view page.
 
 In the controller:
 
 $this-Session-setFlash('Please enter the correct number.',
 'register', array('class' = 'error-message'));
 
 In the view page register.ctp:
 
 ?php if ($session-check('Message.flash')) { $session-flash();}?
 
 This seems so simple.  What am I doing wrong?  Thanks for the help!
 
 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


Re: setFlash not displaying

2010-07-16 Thread StephenE

I am using 1.3.  Your suggestion worked.  Thanks!

From the perspective of a newbie, the CakePHP 1.3 manual needs better
documentation on the setFlash() method.  They need an example of how
to implement it that actually works.


On Jul 16, 10:25 am, Jeremy Burns | Class Outfit
jeremybu...@classoutfit.com wrote:
 Which version of Cake are you using?

 There's no need to check for the presence of a message; -flash() takes care 
 of that for you.

 On 1.3:
 echo $this-Session-flash();

 On 1.2:
 $this-Session-flash();

 Jeremy Burns
 Class Outfit

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

 On 16 Jul 2010, at 05:58, StephenE wrote:



  Hello, newbie here.  I cannot get setFlash() to display a message on
  my view page.

  In the controller:

  $this-Session-setFlash('Please enter the correct number.',
  'register', array('class' = 'error-message'));

  In the view page register.ctp:

  ?php if ($session-check('Message.flash')) { $session-flash();}?

  This seems so simple.  What am I doing wrong?  Thanks for the help!

  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
  athttp://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