Changing magento template file / content on the fly

Posted Over 9 years ago. Visible to the public.

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
Last edit
Over 9 years ago
vasan
Keywords
Magento, Observer, Dynamically
Posted by vasan to vasan's deck (2014-10-01 04:38)