0
votes

How can I create a url route in Bootstrap with param eg www.example.com/index/careers/jobs www.example.com/index/careers/placements

where index is my controller and careers is the action. jobs and placements are params respectively. So far below is what I have created but it would not work for me.

$route = new Zend_Controller_Router_Route_Regex ( 'index/careers/jobs', array ( 'controller' => 'index', 'action' => 'careers' ), array ( 1=> 'jobs' ), 'index/careers/jobs' ); $router->addRoute('careers', $route);

1

1 Answers

0
votes

in your Bootstrap add this function

 protected function _initRouter()
 {
    $router->addRoute('yourRouteName', new Zend_Controller_Router_Route('yournewLocationRoute', array('controller' => 'toYourControllerName', 'action' => 'toYourActionName')));

 }