Monday, January 18, 2016

Adding CMS Static Block to Footer

Add following content on local.xml


<layout>
    <default>
        <reference name="head">
            <action method="addItem">
              <type>skin_js</type><name>js/ism/string-truncate.js</name>
           </action>
        </reference>
        <reference name="footer">
            <block type="cms/block" name="footer_shipping_icon" as="footer_shipping_icon">
                <action method="setBlockId">
                    <block_id>footer_shipping_icon</block_id>
                </action>
            </block>
        </reference>
    </default>
</layout>
Call the CMS/Block on PHTML file. (ex: footer.phtml)
<div class="footer-shipping-icon">
    <?php echo $this->getChildHtml('footer_shipping_icon'); ?></div>

No comments:

Post a Comment