1.3 Pagination: disable default ordering...
I want to display a set of paginated results, which are returned as an
array based on a keyword search. The array from the search action
puts the id of the entries in the order of their relevance.
I am using this code in my action:
$this->set('portfolioEntries', $this->paginate(null,
array('PortfolioEntry.id'=>$result)));
where $result contains the array, which is something like array
(1,5,3,4,2) say. However, by default, it appears that pagination
rearranges them in order that they were created so I end up with
1,2,3,4,5. Is there any way to override this?
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