cakePHP

Disabling the Layout and the View in cakePHP

Written by Ian Carnaghan · 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
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

avatar
  Subscribe  
Notify of