Monday, November 3, 2008

Re: Another pagination problem

You have to add the query to the pagination helper by calling
$paginator->options(...)

In your controller you're using a POST to get the search query. I
recommend changing this to a GET so that it can be passed to other
pages as part of the URI

I do paginated search using a get like this /controlller/action?
q=search_term

I can then pass this to the paginate helper like this inside the view.

$paginator->options(array('url' =>array('?'=>'q='.$this->params['url']
['q'])));

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

No comments: