CMenu widget and active highlighting

Here is my Users menu link:

array('label'=>'Users, 'url'=>array('/user/index), 'visible'=>!Yii::app()->user->isGuest),

I want this link to remain highlighted when user navigates to all sub-links of ‘user’, for example: user/admin, user/view, user/update, user/create

Anyone able to advise?







Good stuff. Looks like this functionality has changed from v1.0 (it used to do it automatically).

A link will be "active" if it links to the current page.

In your case, if you are viewing user/update page, then a menu item “index” (which links to user/index or user) won’t be active, because actions are different.

Yeah!! Thanx for that solution. It works. Especially when you use extensions based on cmenu. they don’t want to do it automatically, for some reason, but it works like that.