Inactive parent in CMenu


I’ve got this CMenu with submenu items on model3 item.

<div id="myslidemenu" class="jqueryslidemenu">

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



		array('label'=>'Home', 'url'=>array('/site/index')),

		array('label'=>'model1', 'url'=>array('/model1/admin')),

		array('label'=>'model2', 'url'=>array('/model2/admin')),

		array('label'=>'model3', 'url'=>array('') 


			array('label'=>'model3-action1', 'url'=>array('model3/action1')),

			array('label'=>'model3-action2', 'url'=>array('model3/action2')),


		array('label'=>'Login', 'url'=>array('/site/login'),

		array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout')


		)); ?>

<br style="clear: left" />

</div><!-- myslidemenu -->

How can I make the parent model3 not to be URL just to open submenu with model3-action1 and model3-action2?

Now when I put mouse over model3 menu item I get current URL, even with ‘activateParents’=>false.

array('label'=>'model3', 'url'=>array(''), 

When I remove ‘url’ param it works then… but item model3 loses css.

Any suggestions about this?

You can use ‘url’=>’#’, this will be an anchor to the top of the page.

If the menu is at the top, no problems…

Another option is to add the css for the link:

#menu a


   cursor: pointer;

   text-decoration: underline;


Usually are this 2 property that are setted by defoult on link but not on all a.

When I add ‘url’=>’#’ it redirects me to the index method of controller of current model, the page is being reloaded (I see this in status bar of browser) - so it is not just moving me to the top of page.

This style of a will then remove “hand” from all parent menu items (even if they don’t have subitems) and this is not what I want…

When ‘url’ is removed the label text is rendered as a span text… so you can add CSS rule for that…