I want to route the /market-research/ to /index/index/slide/2
So I want to pass this value 2 for the 'slide' parameter
$routemr = new Zend_Controller_Router_Route_Static(
'market-research',
array('controller' => 'index', 'action' => 'index')
);
$router->addRoute('market-research', $routemr);
How can I do this ? Thanks.
try the following :
$router = $frontController->getRouter();
$route = new Zend_Controller_Router_Route_Static(
'/market-research',
array(
'controller' => 'index',
'action' => 'index',
'type' => 'slide', //default value (im using 'type' just as an example)
'id' => 2, //default value
));
$router->addRoute('market-research', $route);
This should do it:
$router = $this->_front->getRouter();
$route = new Zend_Controller_Router_Route(
'market-research/',
array(
'controller' => 'index',
'action' => 'index',
'slide' => 2
)
);
$router->addRoute('index-marketresearch', $route);