yii: rendering a view

by prettyscripts on 2010-10-29 11:58

phpyii

the following codes are called from view files, and assume the file to be included is named partial.php.

to render a view from the current controller, ie view files are from the same directory:

PHP:

$this->renderPartial('partial');

to render a view from a another model:

PHP:

$this->renderPartial('/<model name>/partial');

to render a view from a module:

PHP:

$this->renderPartial('<module name>.views.<model name>.partial');