Looking For The Best Way To Include A Template To Cgridview

Hi all!

I wonder how to include a template file in a better way ( yii way ):




$template = file_get_contents('/var/www/html/foo/protected/views/activity/_list_activities.php');


$this->widget('zii.widgets.grid.CGridView', array(

    'dataProvider'=>$dataProvider,

    'htmlOptions' => array('class' => 'table-responsive'),

    'itemsCssClass'=>'table table-striped b-t text-sm',

    'template' => $template,

    'pager'=>array(

            'header' => '',

     ...

     ...

     ...



Thanks

possible a


$templete=$this->renderPartial('_list_activities','',true,false); 


$this->render('gridView', array('dataProvider' => $dataProvider, 'template'=>$template);



in the