Yii 1.1: CMenu widget like bootstrap navbar with submenu

1 follower

<div class="collapse navbar-collapse navbar-ex-collapse">
        $this->widget('zii.widgets.CMenu', array(
                    // Important: you need to specify url as 'controller/action',
                    // not just as 'controller' even if default action is used.
                    array('label'=>'Home', 'url'=>array('site/index')),
                    // 'Products' menu item will be selected no matter which tag parameter value is since it's not specified.
                            'label'=>'Products <span class="caret"></span>',
                            'linkOptions'=> array(
                            'class' => 'dropdown-toggle',
                            'data-toggle' => 'dropdown',
                                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),
                ,'htmlOptions'=>array('class'=>'nav navbar-nav')
                ,'activeCssClass' => 'active'


Be the first person to leave a comment

Please to leave your comment.