Can a 2 layer horizontal menu be created using CMenu? (Each link on the upper layer should render a different submenu.)
For me, the example the documentation produces the same submenu for each upper link, and the login link disappears.
Thanks Sean2253
-------------------------------------------
$this->widget('zii.widgets.CMenu', array(
'items'=>array(
array('label'=>'Home', 'url'=>array('site/index')),
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),
),
));
--------------------------------------------
Page 1 of 1
CMenu multiple submenu 2 layer horizontal menu
#2
Posted 01 March 2010 - 02:51 PM
Take a look at the 'NavBar'-Style of the superfish plugin:
http://users.tpg.com...erfish/#sample4
(click on 'Examples' after this url has been loaded)
It can easily be used within yii using the CDropDownMenu Extension.
This is a wrapper for the superfish plugin and can be set to 'navbar' style.
http://users.tpg.com...erfish/#sample4
(click on 'Examples' after this url has been loaded)
It can easily be used within yii using the CDropDownMenu Extension.
This is a wrapper for the superfish plugin and can be set to 'navbar' style.
#4
Posted 02 March 2010 - 05:05 AM
Thanks Thyseus.
However I do not want a menu that changes with/without hover.
I want each submenu to persist when its parent link is clicked.
I may have to do a hardcoded querystring based system?
Sean2253.
However I do not want a menu that changes with/without hover.
I want each submenu to persist when its parent link is clicked.
I may have to do a hardcoded querystring based system?
Sean2253.
#5
Posted 02 March 2010 - 02:35 PM
http://www.yiiframew...eParents-detail
http://www.yiiframew...nu#items-detail
See the 'active' option
You're just going to have to mess around with the different options and the CSS
http://www.yiiframew...nu#items-detail
See the 'active' option
You're just going to have to mess around with the different options and the CSS
http://php-thoughts.cubedwater.com - my bloggings about Yii
Share this topic:
Page 1 of 1

Help












