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

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -