Disabling the Layout and the View in cakePHP

13 sec read

To disable the view and the layout in cakePHP set autoRender to false within the appropriate action in your controller

$this->autoRender = false;

To only disable the layout in cakePHP set the layout to false

$this->layout = false;

And to only disable the view for an action call the render method and set the parameter to false

$this->render(false);

Last Updated On March 22, 2018

Leave a Reply

avatar
  Subscribe  
Notify of