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



array('label'=>'REgions', 


        'url'=>array('/regions'), 


        'visible'=>!Yii::app()->user->isGuest,   


        'pattern'=>array('regions/region')),


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…

http://www.yiiframework.com/forum/index.php?/topic/3024-chtmllink-and-normalizeurl-should-have-an-option-to-make-url-absolute/page__p__16805__hl__CHtml::link%20absolute%20links__fromsearch__1&#entry16805