ZF-11141: Add default module name string in the URIs when the user customize default routes


I change the default routes to create a chained route between the current region and the default routes, so every url that I create is something like this: http://blah.com/us/default/index/index -> /:region/:module/:controller/:action.

The problem that I have and that's why I want to add this feature is because this application has a controller named UsersController inside the default module: application/modules/default/controllers/UsersController.php and it has a module named users: application/modules/users/controllers/IndexController.php so when the 'default' module name string is not append to the url I got this return from the url view helper: http://blah.com/us/users so zend framework tray to load 'users' module instead of 'users' controller, what I want is an option to add this string 'default' in the url when you have something like this. I just hack the url view helper and the redirector to append 'default' string when the module is 'default'.

My current configuration: resources.router.routes.module.type = "Zend_Controller_Router_Route_Module" resources.router.routes.region.type = "Zend_Controller_Router_Route" resources.router.routes.region.route = ":region" resources.router.routes.region.reqs.region = "[a-z]{2}" resources.router.routes.region.abstract = 1 resources.router.routes.default.type = "Zend_Controller_Router_Route_Chain" resources.router.routes.default.chain = "region, module"



No comments to display