Magento - Show blocks that are not loaded in the current Object or Template

Customizing Magento could be difficult. Here is an easy way to display any block in any template file that cannot be loaded with $this->getChildHtml().

<?php echo $this->getLayout()->getBlock('top.search')->toHtml() ?>

1 comments for Magento - Show blocks that are not loaded in the current Object or Template

Flossy's picture

I can't beielve you're not...

I can't beielve you're not playing with me--that was so helpful.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.