Hello
I am working on cakephp and totally a newbie to php/cakephp. Can you please tell me what is wrong with my route configuration here?
Router::connect(
'/news/:q/:page',
array('controller' => 'news',
'action' => 'onDemand',
'mode'=>'news',
'page'=>1),
array('pass'=>array('q','mode','page'),
'page' => '[\d]+'));
When i access the page as /news/123 or /news/123/1, it tries to find for action '123' in news controller.
Basically all I want to do is that if user types /news/android , I want to capture 'android' to query and return the results. If there are too may results, need to support pagination i.e. url becomes /news/android/(2...n) .
Appreciate any help. thanks