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

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

android - Format a french phone number -