I am currently trying to perform pagination using CakePHP's pagination helper.
I have a series of "Listing" rows that are returned and paginated as expected. When the user clicks on the column headings however, I'd like the sort() method to be forced to prioritise certain listings (i.e. priority listings, those with ['Listing']['priority_flag'] = 1) first. However, when the user clicks on the column header, the browser url is set to
www.mysite.com/listing/index/page:1/sort:description/direction:asc
Hence, it is only sorting by description (as the user clicked on the column header for 'description'), ignoring anything to do with priority_flag.
All help appreciated!
gaioshin