|
|||
|
I am trying to add multiple routes to the same controller, and they work as long as I only add one route to each controller. Below is an example of what I am trying to do, and the assumptions one works fine, and the 3 after that work find if I comment out the other 2, but only the last one entered works. Sorry if this I dont make any sense, I suck at explaining problems. I searched the forum and couldn't find anything like this, so feel free to bash on me, but please point me in the right direction.
Thank you PHP Code:
|
|
|||
|
Hi,
Please give the different route name if you route to same controller. for eg $router->addRoute( 'drafts1', new Zend_Controller_Router_Route('drafts/locked/:locked', array('controller' => 'drafts', 'action' => 'lockdraft')) ); $router->addRoute( 'drafts2', new Zend_Controller_Router_Route('drafts/rename/:rename', array('controller' => 'drafts', 'action' => 'index')) ); // Works if I comment out the bottom one $router->addRoute( 'drafts3', new Zend_Controller_Router_Route('drafts/delete/:delete', array('controller' => 'drafts', 'action' => 'index')) ); // Works just like this Hope it would help. Sivakumar Natarayan |
![]() |
| Thread Tools | |
| Display Modes | |
|
|