Search code examples
yiiframeworkswidgetyii-booster

YiiBooster Navbar target _blank


I am using the navbar of the extension Yiibooster, but I am having problems with a subitem of the menu, I need to go to a new tab, but I can't make it.

<?php $this->widget(
    'bootstrap.widgets.TbNavbar',
    array(
        'brand' => '<img src ="' . Yii::app()->request->baseUrl . '/images/FAVICON.png" />Inicio',
        'fixed' => false,
        'collapse' => true,
        'items' => array(
            array(
                'class' => 'bootstrap.widgets.TbMenu',
                'items' => array(
array(
                        'label' => 'Informes',
                        'items' => array(
                            array('label' => 'Listado de Activos', 'url' => Yii::app()->baseUrl.'/ZfInmuebles/verpdf',
                                'itemOptions' => array('target' => '_blank')),
                        )),

Solution

  • add class=>'bootstrap.widgets.TbMenu' like

     'items' => array(
                array(
                    'class' => 'bootstrap.widgets.TbMenu',
                    'submenuOptions' => array('target' => '_blank'),
                    'items' => array(
                        array('label' => 'Listado de Activos', 
                                   'url' => Yii::app()->baseUrl.'/ZfInmuebles/verpdf',
                                                                     ),
                    )
                )