CakePHP Pagination

Posted by & filed under CakePHP.

When you add passed parameters for a custom ‘find’ for the pagination routine you need to propagate the params for 2nd and subsequent pages.

This is because on 2nd and subsequent pages the action performing the pagination is not receiving the passed params and has ‘lost’ them.

You can propagate these params through the Session or via the query string. The latter method can end up having to test 2 or 3 different vars ($this->passedArgs, $this->params[‘named’], $this->params[‘url’], etc.) if you are inconsistent in the way you write the query string in your Views!

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>