I'm starting a project at the company where I develop, and we're thank you for using the Yii Framework along with Bootstrap , but I'm not you can put the Bootstrap ( glyphicon-bootstrap
) icons in the menu, follow the code example:
$this->widget('zii.widgets.CMenu',
array('htmlOptions'=>array("class"=>"nav", "id"=>"side-menu"), 'items'=>array(
array('label'=>'Home', 'url'=>array('/site/index')),
array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
array('label'=>'Contact', 'url'=>array('/site/contact'), 'className '=>'tafaera'),
array('label'=>'Charts', 'url'=>array('/submenu/sub0'),
'submenuOptions'=>array('class'=>'nav nav-second-level'),
'items'=>array(
array('label'=>'Sub 1.1','tag'=>'tafarel' ,'url'=>array('/submenu/sub1')),
array('label'=>'Sub 1.2', 'url'=>array('/submenu/sub2')),
array('label'=>'Sub 1.3','url'=>array('/submenu/sub3')
)
)
),
array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
array('label'=>'Hola', 'url'=>array('/hola/index')),
array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
),
));