Zend Framework – Disable Zend Layout

What’s Zend Layout

Everybody knows that sometimes you need header and footer for almost every page. In Zend Framework you don’t need to include them in every template page, as it will be if you were using Smarty for instance. You just need to use Zend_Layout. It’s easy and it’s helpful.

What if you don’t need layout for a controller action?

Well if you have to have a given controller action with no use of Zend_Layout, you just need to disable it.

How …

… simply by placing this line in you controller action:

$this->_helper->layout->disableLayout();

5 thoughts on “Zend Framework – Disable Zend Layout

Leave a Reply

Your email address will not be published. Required fields are marked *