This is the blog for getting Idea regarding PHP, Magento, jQuery and JavaScript for Customization.

Friday 26 October 2012

Magento : Get value of CMS Static Block using XML file



This is a XML block, Simply use this in your XML file of layout directory,


<block type="cms/block" name="Here Id of your Static block">
<!--
The content of this block is taken from the database by its block_id.
You can manage it in admin CMS -> Static Blocks
-->
<action method="setBlockId"><block_id>"Here Id of your Static block"</block_id>                                 </action>
</block>


For Example,


<block type="cms/block" name="header_block">
<action method="setBlockId"><block_id>"header_block"</block_id>                                 </action>
</block>

As per example, Here "header_block" is a static block in CMS->Static Block .

No comments:

Post a Comment