Если ничего не помогает (как в моем случае):
<?php
/**
* Renders a view file & returns result.
* @param string $_viewFile_ view file path
* @param array $_data_ optional data to be extracted as local view variables
* @param boolean $_return_ whether to return the rendering result instead of displaying it
* @return mixed the rendering result if required. Null otherwise.
*/
public function myRenderPartial($_viewFile_,$_data_=null,$_return_=true) {
if(is_array($_data_))
extract($_data_,EXTR_PREFIX_SAME,'data');
else
$data=$_data_;
if($_return_)
{
ob_start();
ob_implicit_flush(false);
require(YiiBase::getPathOfAlias("application.views").$_viewFile_.'.php');
return ob_get_clean();
}
else
{
require($_viewFile_);
}
}
?>