Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is getHtml() in Magento

Tags:

magento

In product filter phtml file Magento call a function getHtml().

What is getHtml() in Magento and what was diff between getHtml() & getChildHtml().

like image 297
Sankar Subburaj Avatar asked Oct 19 '12 14:10

Sankar Subburaj


1 Answers

Programmatically getHtml() is a public method for calling the protected rendering method Mage_Core_Block_Template::_toHtml(), while getChildHtml() attempts to find a block instance from the calling block's _children array and return the value of its rendering using the more common Mage_Core_Block_Abstract::toHtml() method.

Architecturally I'm not 100% clear on any intent beyond shaving off minuscule processing overhead, inline translation, and cache writing for these filter block instances.

like image 158
benmarks Avatar answered Nov 18 '22 09:11

benmarks