Megamenu In Yii With Divs

Hi Yiiers,

I just started working with Yii, and I am having some trouble converting my HTML Megamenu to Yii. Basically my html is something like this:




<div class="nav-wrapper">

        <div class="container">

            <ul class="some_class">

                <li class="active"><a href="#">Parent 1</a>

                    <div class="megamenu">

                        <div class="row">

                            <a href="#" class="overview">Child 1</a>

                        </div>

			<div class="row">

                            <div class="col1">

				<ul>

                                    <li><a href="#">Child 3</a></li>

                                    <li><a href="#">Child 4</a></li>

				</ul>

                            </div>		

			</div>

                    </div>

                </li>

             </ul>

         </div>

  </div>



Adapting this to CMenu widget is proving more difficult than I thouht…especially for e starter like me. I can come up with the classes and lists, but how do I put the Divs within the CMenu Widget?

Thanks

The inside <div>s are a problem, you need to look into the code for CMenu if you can change a sub-menu wrapper. As for the menu code




    <div class="nav-wrapper">

        <?php

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

            'items' => array(

                array('label' => 'Parent 1', 'url' => '#',

                    'items' => array(

                        array('label' => 'Admin', 'url' => array('/admin/site/index')),

                        array('label' => 'Profile', 'url' => array('/profile/')),

                    ),

                ),

            ),

        ));

        ?>

    </div><!-- nav-wrapper -->



active will be set by CMenu. For the other special things look into the itemOptions & linkOptions of the $items array().