I've three module
- default
- frontend
- backend
I'd like to hide default and frontend module from t开发者_JS百科he url
So I'd like to set the module depending on the controller
because the defautl module is only used for errorController
Thank you
You can specify default controller directories by doing something like this:
$front->setControllerDirectory('../application/modules/default/controllers');
To do it in the application config file:
resources.frontController.controllerDirectory = APPLICATION_PATH "/modules/default/controllers"
This will allow the error controller to be accessed by by both modules.
To change the default route, you'll need to add this to your routes.ini and change the modules/controllers.
routes.index.type = "Zend_Controller_Router_Route"
routes.index.route = "/"
routes.index.defaults.module = "default"
routes.index.defaults.controller = "index"
routes.index.defaults.action = "index"
精彩评论