Hi I’m using the test code from http://www.yiiframework.com/doc/api/1.1/CMenu
$this->widget('zii.widgets.CMenu', array(
'items'=>array(
// Important: you need to specify url as 'controller/action',
// not just as 'controller' even if default acion is used.
array('label'=>'Home', 'url'=>array('site/index')),
// 'Products' menu item will be selected no matter which tag parameter value is since it's not specified.
array('label'=>'Products', 'url'=>array('product/index'), 'items'=>array(
array('label'=>'New Arrivals', 'url'=>array('product/new', 'tag'=>'new')),
array('label'=>'Most Popular', 'url'=>array('product/index', 'tag'=>'popular')),
)),
array('label'=>'Login', 'url'=>array('site/login'), 'visible'=>Yii::app()->user->isGuest),
),
));
Other test code such as zii.widgets.jui.CJuiAutoComplete and zii.widgets.jui.CJuiDraggable work fine in my Yii view…
The CMenu code snippet just shows the links as a hierarchical list.
When using a div with an id of mainmenu things seem to improve a bit… then I tried using a lot of nested arrays:
http://sky-walker.net/temp/test/yii/testnews/index.php?r=site/test
It supports array nesting of 5+ levels deep…
But if I highlight/select it all (to display the white menu links) it doesn’t display the hierarchy nicely…
I was wondering if it could be a popup menu that gradually shows children if the parents are hovered over?
I also tried disabling the div with id of mainmenu from the layout’s main.php.
I’m using the MbMenu Yii extension now…
http://www.yiiframework.com/extension/mbmenu
It is very easy to install and use and it seems the input array from CMenu can be reused with it (as well as the CssMenu Yii extension)…
It is at the bottom of:
http://sky-walker.net/temp/test/yii/testnews/index.php?r=site/test