Sankar Subburaj
Sankar Subburaj

Reputation: 5042

What is getHtml() in Magento

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

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

Upvotes: 5

Views: 7921

Answers (1)

benmarks
benmarks

Reputation: 23205

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.

Upvotes: 9

Related Questions