Bootstrap Widgets Tbmenu Onclick Dropdown

Hi I have bootstrap nav list the code is this




  $this->widget('bootstrap.widgets.TbMenu', array(

    'type'=>'list',

    'items'=>array(

        

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

        array('label'=>'Logout', 'icon'=>'icon-off', 'url'=>array('/site/logout')),

		array('label'=>'Department'),

		array('label'=>'Admin Mngt','icon'=>'globe','url'=>'admin'),

		array('label'=>'Departments','icon'=>' icon-th-large','url'=>'admin'), //onlick list all the department in certain table

         

    ),

)); 



now when i click the "department" i prefer to have a dropdown on certain table how to add it in the array of departments…

Dear Roadrunner,

you can try to add ‘items’ to the department part.

Thus,




 $this->widget('bootstrap.widgets.TbMenu', array(

    'type'=>'list',

    'items'=>array(

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

        array('label'=>'Logout', 'icon'=>'icon-off', 'url'=>array('/site/logout')),

        array('label'=>'Department', 'items'=>array(

            array('label'=>'Submenu', 'url'=>...),

       ),),

                array('label'=>'Admin Mngt','icon'=>'globe','url'=>'admin'),

                array('label'=>'Departments','icon'=>' icon-th-large','url'=>'admin'), //onlick list all the department in certain table

         

    ),

));

Is this a solution for you?