cancel
Showing results for 
Search instead for 
Did you mean: 

How do I add static blocks to home page?

How do I add static blocks to home page?

Hi,

 

Can anyone tell me how I add a new static block to my home page? 

 

I want to create an additional static block that does not currently exist in my cms/static_blocks menu. I know how to create the static block, but what I do not know how to do is how I specify where I want it to appear on the frontend of my home page. I want it to appear below my menu as shown in the image below.

 

Do I have to edit the template file or can it be done via cms/homepage/design/custom design tab?

 

 

Thanks

4 REPLIES 4

Re: How do I add static blocks to home page?

Hey,

 

If it is not predefined in Magento, then you might need to make some changes in CSS.

Re: How do I add static blocks to home page?

It depend really on your theme, there's (as always) more than one way to do it: 

 

{{block type="cms/block" block_id="static-block-id"}}

 

from cms page or from another static block

 

or

 

<block type="cms/block" name="static-block">
<action method="setBlockId"><block_id>static-block-id</block_id></action>
</block>

 

inside right reference block using layout updates

 

or

 

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('static-block-id')->toHtml();?>

 

in phtml templates. But the list doesn't end there.

Tanel Raja

Re: How do I add static blocks to home page?

Thanks pronto,

 

For addressing the issue.

Re: How do I add static blocks to home page?

<block type="cms/block" name="home_center-image" before="-">
      <action method="setBlockId"><block_id>home_center-image</block_id></action>
</block> 

Use this code

Hope this will helpful for you

Want Magento Professionals ?
& Get FREE 3 hour development today with ClapCreative - Building a Better User interface with http://clapcreative.com