M
M
Maxim2013-12-07 15:33:03
Yii
Maxim, 2013-12-07 15:33:03

How to properly nest widgets in yii-booster?

It is required to nest the TbListView widget in TbTabs. That is, in the content parameter for TbTabs, display data through TbListView.
Tried to do that, didn't work.

$this->widget('bootstrap.widgets.TbTabs',array(
    'type'=>'tabs',
    'tabs'=>array(
      array(
        'label'=>'Label_1',
        'content'=>array(
            'class'=>'bootstrap.widgets.TbListView',
            array('dataProvider'=>$dataProvider_1,'itemView'=>'_view'),
        ),
        'active'=>true,
      ),
      array('label'=>'Label_2','content'=>'content_2'),
      array('label'=>'Label_3','content'=>'content_3'),
    ),
  ));

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
LastDragon, 2013-12-07
@Frapsy

'content' => $this->widget('bootstrap.widgets.TbListView', array('dataProvider'=>$dataProvider_1,'itemView'=>'_view'), true),

S
Sergey, 2013-12-07
Protko @Fesor

I never understood why widgets should be used for such simple things... The forms are there - it's understandable, okay... but just connect a couple of blocks with the necessary classes and js-ki...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question