Changing magento template file / content on the fly

The template file or content of the magento page can be changed on the fly using observer.

For example, if you want to change the product listing in the category view , just write observer for render before event and remove the specific block and add new block or just replace the template file with new template file with new content.

    $categoryProductBlock->setChild('product_list',$specificBlock);
vasan Over 9 years ago