Monday, March 12, 2012

Magento How to add a static CMS block to the side bar


In Magento Go to
CMS > Static Blocks.
Create a new block

Open app/design/frontend/xxxxxx/xxxxxx/layout/catalog.xml
Add your static block to the left or right section in

<!-- Mage_Catalog -->

For example to add to the left sidebar..
<reference name="left">
<block type="cms/block" name="Block Title" >
<action method="setBlockId"><block_id>Identifier</block_id></action>
</block>
</reference>


OR

Open the file app/design/frontend/default/[your-theme]/template/page/Xcolumns-left.phtml by your favorite text editor
Find the line of code
<?php echo $this->getChildHtml('left') ?>
Add the following code line
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId(' Identifier ')->toHtml() ?>

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.