Drop Down Sub-Menu For The Menu?

Hi all, i would like to add sub-menu as dropdownlist in the right menu of colum2 layout but don’t know how to do it.


$this->menu=array(

	array('label'=>'List User', 'url'=>array('index')),

	array('label'=>'Add Skill', 'url'=>array('user/skill'),

              'item'=>array(....)// would like to become dropdownlist or sublist

              ),

);



Please give me any links or solutions for this question. Thank in advance :)

You may want to use mbMenu extension: http://www.yiiframework.com/extension/mbmenu or this extension as well: http://www.yiiframework.com/extension/cssmenu

If you use Twitter Boostrap it also includes a multi-level menu

I tried it before, both could not use in this case :).

You should implement it in the corresponding layout : /protected/layouts/column2.php by default

But it scale vertical way and over other menu. The case is:

Before the mouse pointer move on:




Menu:

ParentA:

ParentB:




After the mouse pointer over the ParentA:




Menu:

ParentA:

   - SubA:

   - SubB:


ParentB:



Instead of this, the SubA and SubB get over the ParentB. Cant click on ParentB anymore. If the sub menu is long, it will cover all other parent menu.

Please post your running code, and what extension you use?

Here is the code, im using mbmenu extension:




<?php $this->widget('MbMenu',array(

			'items'=>array(

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

                                array(  

                                    'label'=>'ParentA', 

                                    'url'=>array('/adminA'), 

                                    'items'=>array(

                                                        array('label'=>'SubA', 'url'=>array('/adminA/SubA')),

                                                        array('label'=>'SubB', 'url'=>array('/adminA/SubB'))

                                                   ),

                                    ),

				array('label'=>'ParentB', 'url'=>array('/adminB')),

                                array('label'=>'ParentC', 'url'=>array('/adminC')),

		)); ?>