Magento: How do I put widgets into a layout xml? Magento: How do I put widgets into a layout xml? xml xml

Magento: How do I put widgets into a layout xml?


Turns out, it wasn't inserting any meaningful data because it wasn't receiving its parameters. It needs non-standard parameters to be set through action tags:

<block type="enterprise_banner/widget_banner" name="hero_banners" as="hero_banners" template="banner/widget/hero.phtml">    <action method="setDisplayMode"><value>fixed</value></action>    <action method="setBannerIds"><value>4</value></action></block>


Since the topic has already been solved, I have an off topic solution

This could be set as a block within a .phtml file if required.

<?php echo $this->getLayout()->createBlock('enterprise_banner/widget_banner')->setBannerIds('4')->setDisplayMode('fixed')->setTemplate('banner/widget/block.phtml')->toHtml(); ?>