Wednesday, June 12, 2013

Saving session data from a view

I am using CakePHP 1.3.  I have a helper which prints out the navigation menus.  Depending on which top level menu is selected the appropriate sub menu is displayed.  I want to be able to know on the next page view which menu / sub menu was previously displayed.  I thought to accomplish this by writing a session variable from my helper.  However, I am getting the error that session data cannot be written from a view.  Can anyone suggest an alternative way of accomplishing this?

I don't really understand why, if I can read Session information in the view, am I not able to write Session information in a view.

Pointers to appropriate resources or hints and tricks would also be appreciated.

Thanks.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate