Magento Themes and Magento Extensions

Add Static Block to Magento cms Page by updating the Design Layout XML

Share

This is a very simple task.
Once you created the Static Block, simply go to CMS -> Manage Pages. Select your Page or create a new one.
Click on the Design tab on the left and paste the following code to the “Layout Update XML” textarea.
(Also, don’t forget to select the Layout, eg.: 2 columns with left (or right) bar)

<reference name="left">
    <block before="-" name="block-name" type="cms/block">
        <action method="setBlockId"><block_id>block-id</block_id></action>
    </block>
</reference>

The reference name can be left or right depending on which column you would like the block to appear.
The block name can be the same as the id. The block id is of course the Identifier of the block.
You can also set the position of the block by changing the before (or after) options in the block tag.
Once you saved the page, the block should show up in the sidebar.

This has been tested in Magento 1.6, but it should work in almost all the other versions

Comments are closed.