dataProvider already has all the data included in
$dataProvider->data
$dataProvider->getData()
To put it in the main layout, you can create another variable in your controller
class Controller extends CController
{
public $data_exchange='';
...
}
It’s easy to manipulate everywhere in your code using the $this->data_exchangesame breadcrumbsas in your main layout
$this->widget('searchSidebar', array(
'id' => 'searchSidebar',
'data' => $this->data_exchange
));
In your view code, define your data as:
$this->data_exchange = $dataProvider->data
source
share