Tutorial :How to change URL of pagination in CakePHP


I click on the next link. It shows me the URL like


I want to change it like change this to


Like message/inbox/2

Can I do like this?


@gaioshin WTF.. That is the worst thing I've seen with regards to custom routes.

Router::connect('message/inbox/:page', array('controller' => 'fj_messages', 'action' => 'index'), array('pass' => array('page')));  

Something like that should do it just the way you want. Check out routing for more information.

The page will be in $this->params['page'] if I remember correctly.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »