Disabling Layouts and Views in CakePHP
It is easy to disable both the layout and view in CakePHP by putting the following line in your controller action:
$this->autoRender = false;
If you want to disable just the layout, use the following line in your controller action:
$this->layout = false;
And if you only want to disable the view for this action, use the following line in your controller:
$this->render(false);
Note that using $this->layout = false; and $this->render(false); together in your controller action will give you the same results as $this->autoRender = false;
0 comments:
Post a Comment