php - What is Renderpartial function in yii? -
i yiibie, want know renderpartial(), how works , use ? please explain in detail
the renderpartial documentation clear anougth understand it.
renders view.
the named view refers php script (resolved via getviewfile) included method. if $data associative array, extracted php variables , made available script.
this method differs render() in not apply layout rendered result. used in rendering partial view, or ajax response.
so when need show whole page layouts, use render(). if want show view html, use renderpartial().
class controller extends ccontroller { // main page public function actionindex(){ $this->render('index'); } // example, additional content uploaded via ajax after page loaded public function actioninfo(){ $this->renderpartial('info'); } }
Comments
Post a Comment