Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-17-2008, 03:52 PM
Junior Member
 
Join Date: Jun 2008
Posts: 1
Default Zend Route

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:
$router->addRoute(
    
'assumptions',
    new 
Zend_Controller_Router_Route('assumptions/draftid/:draftid', array('controller' => 'assumptions''action' => 'index'))
);  
// Always works
$router->addRoute(
    
'drafts',
    new 
Zend_Controller_Router_Route('drafts/locked/:locked', array('controller' => 'drafts''action' => 'lockdraft'))
);
$router->addRoute(
    
'drafts',
    new 
Zend_Controller_Router_Route('drafts/rename/:rename', array('controller' => 'drafts''action' => 'index'))
); 
// Works if I comment out the bottom one
$router->addRoute(
    
'drafts',
    new 
Zend_Controller_Router_Route('drafts/delete/:delete', array('controller' => 'drafts''action' => 'index'))
); 
// Works just like this 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-19-2008, 04:36 PM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default

Could it be that you are trying to route to the same controller and action in your last route? (controller => darfts, action => index)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:23 AM.