Magento: How To Add A Static Block To A CMS Page

Posted by Damodar Bashyal on April 24, 2009

 

My another hunt on the google to find the process to add a static block to a cms page. After few search and filter, i found a post on a pratthost. It saved my a lot of my time and headache. The following post is taken from it, slightly modified.

Actually, there was nothing complicated about achieving this. Static blocks are a great way to divide up different types of data blocks to make updating content easier.

There are just two simple steps to adding a static block to a cms page.

First, create your static block.

You will use the identifier to call it on the cms page. Let's say, for this example, we call the identifier 'home_page_text'.

Once your static block is created, edit whatever cms page you would like this block to appear on, and simply put this code in right where you want it to show up:

//NOTE: block_id is static block identifier
{{block type="cms/block" block_id="home_page_text"}}

This is how i use it in one of the site's homepage.

<div class="homepage-top-div">
<div class="mermaid">
</div>
<div class="content">
{{block type="cms/block" block_id="home_page_text"}}
</div>
</div>

And that's all.

Scott @sydneydesign posted on - Wednesday 18th of November 2009 04:47:10 AM

Hi Great post thanks for the info.
 
not published on website


QR Code: Magento: How To Add A Static Block To A CMS Page