CMenu put ul into div

Hello,

I have following HTML to make:




           <ul class="select">

                <li><a href="#nogo"><b>Dashboard</b></a>

                    <div class="select_sub">

                            <ul class="sub">

                                    <li><a href="#nogo">Dashboard Details 1</a></li>

                                    <li><a href="#nogo">Dashboard Details 2</a></li>

                                    <li><a href="#nogo">Dashboard Details 3</a></li>

                            </ul>

                    </div>

               </li>

           </ul>



I’m trying to make it with CMenu. So far I have:




                  $this->widget('zii.widgets.CMenu',array(

                            'encodeLabel' => false,

                            'items'=>array(

                                    array('label'=>'<b>Dashboard</b>', 'url'=>array('#nogo'), 'items' => array(

                                        array('label'=>'Dashboard Details 1', 'url'=>array('#nogo')),

                                        array('label'=>'Dashboard Details 2', 'url'=>array('#nogo')),

                                        array('label'=>'Dashboard Details 3', 'url'=>array('#nogo')),

                                    )),

                            ),

                            'htmlOptions' => array('class' => 'select'),

                            'submenuHtmlOptions' => array('class' => 'sub'),

                  ));



The problem I have is with [b]


<div class="select_sub">

[/b]

This div wraps around


<ul class="sub">...</ul>

However, my CMenu code renders the following instead of the needed code (shown in the first code sample above).




<ul id="yw0" class="select">

    <li><a href="#nogo"><b>Dashboard</b></a>

       <ul class="sub">

           <li><a href="#nogo">Dashboard Details 1</a></li>

           <li><a href="#nogo">Dashboard Details 2</a></li>

           <li><a href="#nogo">Dashboard Details 3</a></li>

      </ul>

    </li>

</ul>



I need to put "<div class="select_sub">" which would wrap around <ul class="sub">. How can I do that?

I think it is not possible.

In that case CMenu should accept an extra parameter like a custom ‘itemsContainer’

I think this wiki article should point you in the right direction:

http://www.yiiframework.com/wiki/109/how-to-customize-cmenu-output/