I am not sure if this is a router case.

Here is the case;

*URL
**Controller
**Action
**Descirption
*http://localhost/project
 ProjectController
index
All projects list
http://localhost/project/1 ProjectControllerdetail
Detail of project, ID 1
http://localhost/project/new ProjectControllernew
New project form
http://localhost/project/1/edit ProjectControlleredit
Edit project ID 1
http://localhost/project/1/users UsersController
index
All people related to project ID 1
http://localhost/project/1/users/active UsersControlleractive
Active people on project ID 1
*and so on .... many actions on many
different  controller like users, budget etc*




as you see similar URL with different controllers and actions.

I add the following router

    Zend_Controller_Front::getInstance ()->getRouter ()->addRoute (
'project_view',
   new Zend_Controller_Router_Route ( 'project/:id/:controller/:action/*',
         array ('module' => 'application',
                'controller' => 'project',
                'action' => 'index', 'id' => 0 ),
                 array ('id' => '\d+' ) ) );

But this is a partial solution for this problem.

What can be better solution? adding multiple routers or any other approach?

Reply via email to