Hi,
In my Cake application I have a controller "completed_projects". Its index action takes no arguments and lists some projects. Different pages can be accessed by
example.com/completed_projects/index/page:23
etc.
I want to make the url's like this:
example.com/portfolio/page23
Obviously I need to make some routes for this. I've tried many of them like:
Router::connect('/portfolio/page:num', array('controller' => 'completed_projects', 'action' => 'index'), array('pass'=>'page:num', 'num'=>'[0-9]+'));
and also:
Router::connect('/portfolio/:page:num', array('controller' => 'completed_projects', 'action' => 'index'), array('named'=>'num', 'page'=>'page', 'num'=>'[0-9]+'));
I also tried modifying them again and again but none of them works well.
I am using CakePHP 1.3. Any help will be appreciated.