Is there any file in magento where all html will be output?
I want to minify all html output.
Magento uses a response object to send all output.
All output is added to this object, and then its sendResponse method is called.
If you want to alter the output, setup a listener for the http_response_send_before event
singleton
group/observer
alterOutput
And then in your observer you may get and set the body
class Packagename_Modulename_Model_Observer
{
public function alterOutput($observer)
{
$response = $observer->getResponse();
$html = $response->getBody();
//modify html here
$response->setBody($html);
}
}
If you're interested, this event is called in the sendResponse method of the following class
app/code/core/Mage/Core/Controller/Response/Http.php
and the output itself is sent in the sendResponse and outputBody methods of
lib/Zend/Controller/Response/Abstract.php