Friday, February 3, 2012

Re: Questions about Paginator's setup

The problem, I think, is that you're using a combined backwards compatibility feature and the current way to do things.

When you include the Paginator component, those settings will be used. If you use the deprecated Controller::paginate() method, it will load the existing Paginator (one with no settings) instead of creating a new one and adding the $this->paginate settings.

So, I would say ditch the $this->paginate var on your controller, and use the correct method $this->Paginator->paginate() in you controller method to paginate data. That should use the settings you initialize with (that is, the settings in the $components var).

hth
-jeremy

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
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

No comments: