Cmenu and friendly urls

[SOLVED]

Hi,

I put some url rewriting on my site, in order to have urls like "/", "/corporate", "/projects", or "/project/categorySlug".

But i have a small problem with the main menu : it doesn’t “recognize” where i am in the structure, so he doesn’t activate any menu items.

Since the menu is called in the template //layouts/main, with




$this->widget('zii.widgets.CMenu', array(

	'items' => array(

		array('label' => 'Accueil', 'url' => '/'),

		array('label' => 'Corporate', 'url' => '/corporate'),

		array('label' => 'Projects', 'url' => '/projects'),

...




[AUTO ANSWER]

I had my answer on the live chat : i must use the active parameter on each item of the widget in order for it to know on what condition it should be activated.

Thanks to z0ned

How would you affect the cMenu in, let’s say //layouts/site/contact, in order to activate the good menu item ?

I tried passing the menu through a variable in this, thinking it could somehow propagate it through the view, but it clearly didn’t work.

Thanks in advance