Oct 18, 2012

Magento: How to add static block in your layout file?

Here we need to do, create static block, and assume we set the "my_test_static_block" as our name/identifier.

As we already created the static block. Place the code below in you layout (xml) file

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


See attached image for the sample.

1 comment:

Unknown said...

Thanks for sharing this information in detail.
Magento Developers