In the description of the method of getChildHtml
it is said "Retrieve child block HTML"
In the description of the getChildBlock
method, it says "Retrieve child block by name".
But what is the difference?
Magento – Difference Between getChildHtml and getChildBlock
blocksmagento-1.9magento2
Best Answer
As name suggest
getChildHtml()
render the HTML of block if it find the block andgetChildBlock()
will return only Block object it it find any block.