Monday 18 July 2016

magento call block in any where in page dynamically

Add xml in  Layout Update XML on Designs tab in cms page

<reference name="root">
<block type="bannerslider/default" name="bannerslider" template="bannerslider/bannerslider.phtml">
    <action method="setBannersliderId"><bannerslider_id>1</bannerslider_id></action>
</block>
</reference>

Add below code in any layout page (1column.phtml) where you want show

<?php echo $this->getChildHtml('bannerslider'); ?>

No comments:

Post a Comment