CTabView can render different views in tabs. But every view is supplied with the same set of data provided in viewData:
$this->widget('CTabView',array(
'viewData'=>array (
'x' => $x,
'y'=>$y,
),
'tabs'=>array(
'tab1' => array(
'title' => 'Demo 1 ',
'view' => 'demo1',
),
'tab2' => array(
'title' => 'Demo 2',
'view' => 'demo2',
),
),
));
Each view is rendered with local variables $x and $y. As long as the views don’t use the same variables for different things this may not be a big problem. But if they do it would be good if we could supply view variables like this (doesn’t break bc, if the above is still accepted):
$this->widget('CTabView',array(
'tabs'=>array(
'tab1' => array(
'title' => 'Demo 1 ',
'view' => array('demo1', 'x'=>$x),
),
'tab2' => array(
'title' => 'Demo 2',
'view' => array('demo2', 'y'=>$y)
),
),
));