How to disable zend layout from controller for ajax call only?
Answer / Anjali Mishra
To disable the Zend layout for AJAX requests in your controller, you can set the response format to JSON and bypass the layout. Here's an example:
```php
$this->getResponse()->setHeader('Content-Type', 'application/json');
$this->_helper->viewRenderer->setNoRender(true);
// Your code here...
echo json_encode($result);
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Does zend support php 4? Explain
What should I know about the zend framework cla before submitting it?
What is the difference between zend framework and laravel?
What is the purpose of bootstrap in zend framework?
What is zend helpers?
What is the procedure to see that the optional file is detected?
Explain form element decorators in zend framework2?
What is event manager in zend framework?
What is a module in zend framework 2?
What are plugins in the zend framework?
How to get variable value from getting in zend framework?
Why should we use framework?