MainMenu standard widget and modules routes

I'm experience some troubles with module routes and main menu widget.

The trouble is that MainMenu tabs are not highlighted when I'm in the modules controller.

I've tried to fix that and got that problem is that $controller->uniqueID for module controller is  <module>/<controller>, and if I pass 'pattern' param for that controller id like





It interprets its like an controller and action, and because of this I can't highlight one tab for all actions of modules controller.

How can I intelligent fix this?  ???

for now I did this solution:

if(strpos($controllerID,'/')!==false) { // controller belongs to module

    $controllerID = array_pop(explode('/', $controllerID));


So I'm just remove module name from controller id. This works, but if I'll have to modules with default controller this definatly will not work.

Thanks in advance

i have the same problen with every link…

in the module i must filter the moduleControllerId. outside of a modul i must check the moduleControllerId…

how can i simplify this?

The included MainMenu widget is not designed to work with module. It was there mainly for demo purpose. You may consider modifying it to support module ID.

this is, what i mean…