Search code examples
phpfunctionmagentocontrollermagento-1.9

what is use of loadlayout and renderlayout and what can they do?


what is loadlayout() and renderlayout() do ? in controller'S Function

 public function viewAction()
 {
 $this->loadLayout();
 $this->renderLayout();
 }

Solution

  • $this->renderLayout(); get layout output and process this output to response body and append response

    $this->loadLayout(); creates XML tree at backend.