views:

33

answers:

1

I am using Cakephp to perform a search through sphinx. I wanted to do modify the default structre of pagination links generated by cakephp For example
From:

localhost/search/page:1/key1:google/key2:code 
To:
localhost/search/key1:google/key2:code/page:1 

I want the page number to appear at the end. Is there a way this can be done? Any help appreciated

A: 

I would suggest that you modify the PaginatorHelper. I would recommend that you extend it and load it when Cake launches so that you dont modify the Cake file in cake/libs...

Then, wherever you want the output URL to be printed w/ the page number at the end, you'll need to modify the PaginatorHelper... I'd suggest you search for the page/# key/value pair. If you find it, remove it, then append it to the end of the string. Then return that value.

Edit: link to PaginatorHelper in the API - http://api.cakephp.org/class/paginator-helper

Travis Leleu
Good answer, but it seems like an awful lot of work for very little benefit... :-)
deceze