@wiredesignz: Yeah, I really wanted to stay away from that. I don’t want to have to add manual routing for every controller each time.
I ended up going through the code and adding a quick fix that seems to be working very well. The only issue is that when you have an update, I’ll have to modify the code again. Here’s what I did.
In application/third_party/MX/Modules.php on roughly line 92, in the load method, I changed to
list($class) = CI::$APP->router->locate($segments, true);
In application/third_party/MX/Router.php on roughly line 63, the locate method, I changed to
public function locate($segments, $get_module=false) {
Then still in that file, on roughly line 79, I changed to
list($module, $directory, $controller) = array_pad($segments, 3, NULL);
if($get_module !== false){
foreach (Modules::$locations as $location => $offset) {
And added the corresponding close bracket on roughly line 114, right after the foreach closes.
And finally, in application/core/MY_Router.php on roughly lines 32 and 33 I changed to
public function locate($segments, $get_module=false){
if($located = parent::locate($segments, $get_module)) return $located;
And I believe that’s it. The only other thing I’d like to do is make it a config option so that I can turn the feature on an off for different projects, but I’ll worry about that later.