Disabling the Layout and the View in cakePHP

No Comments

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);

Image Credits: Photo by Isis França on Unsplash.

Last Updated On March 22, 2018

Related Articles

No results found

Leave a Reply

avatar
  Subscribe  
Notify of
Menu
Copy link