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
Hey,
If it is not predefined in Magento, then you might need to make some changes in CSS.
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.
<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