Some call it magic… well it’s quite easy…
'content'=>$this->widget('bootstrap.widgets.BootDetailView', array(
'data'=>array('id'=>1, 'firstName'=>'Mark', 'lastName'=>'Otto', 'language'=>'CSS'),
'attributes'=>array(
array('name'=>'firstName', 'label'=>'First name'),
array('name'=>'lastName', 'label'=>'Last name'),
array('name'=>'language', 'label'=>'Language'),
),
), true),
$this->widget(widgetName, dataArray)
… writes the output directly to the page because the default of the 3rd parameter is false.
$this->widget(widgetName, dataArray, true)
… "captures" the output and returns it as String object.
Here is the class reference.
…
You can also make use of renderPartial() for long content that needs a lot of additional php code and stuff…
'content'=>$this->renderPartial('filename', array(), true, false),
Put all code/content in ‘filename.php’ pass variables in array() as usual. With some clever logic you could have only 1 extra file for all the tabs’ contents.
Yii-Haw!