Answer About Zii.widgets.cmenu

Hi everybody,

I am a newbie of Yii and I’m still learning some basics of the framework.

I followed the procedure for the installation and the creation of a new project via yiic and prompt.

Everything works fine and I have my scheleton application with a top menu


Now, as I understood reading an on-line startup guide, in order to apply changes to the menu in object I should edit the file protected/views/layouts/main.php on the following snippet of code:

<div id="mainmenu">

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


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

				array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),

				array('label'=>'Contact', 'url'=>array('/site/contact')),

				array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),

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


		)); ?>


I apply changes, try to add new items but I can’t see any difference.

I’ve also deleted the file in object but the application continue to load the web page without any kind of problem…

I’ve integrated also Twitter Bootstrap.

Did I miss anything?

Maybe it depends from some feature like MemCache o similar?

Thanks in advance to everybody!

Hi Fabrizio, welcome to the forum.

Probably you are editing the wrong file. I think that Twitter Bootstrap extension for Yii is using the different file for its default layout.

Maybe under "themes" folder.

Hi Softark,

thanks for your quick reply


I was editing the wrong file:

when you integrate "twitter bootstrap" the file responsible for the Layout is:

[font="Courier New"][color="#FF0000"]root/themes/bootstrap/views/layouts/main.php[/color][/font]

It was also reported within the Layout file: snippet in the index page. :P

Thank you very much!! :)