How to disable layout from controller?
Answer / Navaneet Kumar
To disable the layout in Zend Framework, you can override the `initView()` method in your controller and set the layout to null. Here's an example:
```php
public function init() {
parent::init();
$this->view->layout()->setEmptyViewTemplate('path/to/your/empty_layout');
}
```
In this example, you should replace 'path/to/your/empty_layout' with the path to your custom empty layout.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is authorization in zend framework?
When do we need to disable layout?
How to integrate external scripts with zend framework ?
How to call two different views from same action?
Is there a way to make fpdf/fpdi or zend_pdf support the parsing of pdfs greater than 1.4?
What is the major difference between zend_auth and zend_acl?
How to check request is ajax in zend framework?
How to install zend framework?
What is a module in zend framework 2?
How to display zend_form_element_radio on one line ?
Explain what is being presented by the decorators?
What are naming convention for php file?