Magento Certified Developer GuideCategory: 3.2 BlocksHow can output buffering be enabled/disabled when templates are rendered?
Manish Prakash Staff asked 5 years ago

Each block file calls the function “getDirectOutput()” to check if output buffering needs to started or not.
We can disable/enable it using “$this->getLayout()->setDirectOutput(true)” or “$this->getLayout()->setDirectOutput(false)”. Bascially we just need get the instance of layout object for which there exist multiple ways as discussed above.

By default this is turned off in the “renderLayout()” function of “Mage_Core_Controller_Front_Action”