Thursday, June 17, 2010

need a little help with my OrderingComponent

Hello.

i just wrote a simple component that keeps track of latest user's
sorts in every index view of every controller in my app
for example if an user sorts Orders by date_created (default is code)
the component will write in session
- the page the user was viewing
- the sort field
- the sort order

if the user goes back to to orders/index he should find the same page
as the last visit.

problem: i cannot find a working way to re-load the saved parameters

$controller->params["named"] = $this->Session->read("blahblahblah")
<---- doesn't work
$controller->paginate = $this->Session->read("foo") <-- doesn't work
either

i'm working in Component's initialize.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate