Charles Harley wrote:
Matthew Weier O'Phinney wrote:
-- Charles Harley <[EMAIL PROTECTED]> wrote
(on Thursday, 23 August 2007, 12:39 PM +0100):
  
I'm developing a site with default controllers that has the same name as 
some of the modules. This is done because I need to have links such as 
the following:

www.domain.com/clients/index
www.domain.com/clients/subscribe
www.domain.com/clients/jobs/index

I know I can just create an index controller and a subscribe controller 
as part of the clients module but it would be neater if I was able to 
create a clients controller as part of the default module that then just 
has actions for index and subscribe and then create the jobs controller 
as part of the clients module. Is it possible to configure the framework 
to work this way?
    

Use a custom route to map the URLs you want to the appropriate actions
in the module's index controller.

  
Thanks Matthew, I tried setting up a custom route using a configuration file but I'm getting a strange result. Here is my configuration file content for the route:

routes.clientslogin.type = "Zend_Controller_Router_Route_Static"
routes.clientslogin.route = "login"
routes.clientslogin.defaults.module = "clients"
routes.clientslogin.defaults.controller = "index"
routes.clientslogin.defaults.action = ""

And here is the error message I get:

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (clients)'

I know that it is using the configuration setting because if I remove the module setting it throws an error message saying that the login action cannot be found on the default index controller. It seems that the module setting is being used as the controller.

Many thanks,

Charles
Solved the problem, turns out one of my auth controller plugin was altering the request module incorrectly on the preDispatch call.

Doh! Where would we be without debuggers!

Charles

Reply via email to