PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, March 4, 2022

[FIXED] YiiBooster Navbar target _blank

 March 04, 2022     frameworks, widget, yii, yii-booster     No comments   

Issue

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',
                                                                 ),
                )
            )


Answered By - Rafay Zia Mir
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing