Please correct me if i am wrong and i can do this with Yii already without hacking the core files.
If i have a method called actionView() in the modules/moduleName/controllers/DefaultController.php and i access /moduleName/view/, yii thinks that i am looking for a ViewController file, which is not the best assumption in this case. In order to access that method from the default controller, i need to do /moduleName/default/view/ which is very ugly, i mean, why the “default” word should be in URL ? Wouldn’t be 10 times nicer, if we could name the default controller same name as the module and in this case, when something like /moduleName/view is requested Yii should look to see if there is a ViewController file, if not, then it should look for the file named ModuleNameController.php and if it finds it to return the actionView method from within that controller ?
I believe this is the way it should work, because it gives more flexibility and performance boost, because we don’t have to remap the default controller for each requested action .
What i am trying to get here, is a smooth way to get rid of the name "default" from the url when accessing
a module. I am aware that i can do this by hard coding the URL manager rules, but there has to be another way,
so that i don’t have to write tens of rules to achieve this.
I have a cms with over 20 modules and many of them have 3 or 4 sub-modules, if i write rules for each of the modules, the performance will decrease considerably .
Ideas ?