I have changed the layout code to

                <div id="content">      
                        <?php
                        echo $session->flash();                 
                           echo $content_for_layout;
                        ?>      
                </div>  

and it worked perfectly. Thanks Jeremy .

Johannes

2010/3/18 Jeremy Burns <jeremybu...@me.com>:
> You need to do:
>
> echo $session->flash(); now.
>
> Jeremy Burns
> jeremybu...@me.com
>
> On 18 Mar 2010, at 13:06, Johannes Goll wrote:
>
>> Hi,
>>
>> I am migrating from 1.2 to cakephp 1.3 and am trying to
>> switch to the new $this->Session->setFlash functionality that
>> uses elements:
>>
>> Projects Controller:
>> function edit($id = null) {
>> ...
>> $this->Session->setFlash('The Project has been saved','message');
>> $this->redirect(array('action'=>'index'));
>> ...
>> }
>>
>> Layout:
>> <div id="content">
>> <?php
>>
>> $session->flash();
>>
>> echo $content_for_layout;
>> ?>
>> </div>
>>
>> Element;
>>
>> <div id="flashMessage" class="message">
>>       <?php
>>          echo $message;
>>       ?>
>> </div>
>>
>> No message is shown on the Projects index page after executing the
>> edit action of the controller.
>> But when I do a die($message) inside the element, the message is displayed.
>>
>> What am I doing wrong here?
>>
>> Thanks,
>> Johannes
>>
>> 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



-- 
Johannes Goll
211 Curry Ford Lane
Gaithersburg, Maryland 20878

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

Reply via email to