December 24, 2014

Magento how to call other block in phtml file

Magento how to call other block in phtml file

To get the block in your template, other than child block.
When you want to call the block other than specified xml child blocks.
$this->getLayout()->getBlock('block_name')->toHtml();
For example
$this->getLayout()->getBlock('top.links')->toHtml();    

No comments:

Post a Comment