Add static block to template

First you have to create the static block in admin->CMS-> Static Blocks. Let’s name it “home_banner”

Then, In the layout (app/design/frontend/your_theme/layout/page.xml) add this code:

[xml]

<cms_page>
        <reference name="content">
            <block type="cms/block" name="home_banner" as="home_banner">
                <action method="setBlockId"><block_id>home_banner</block_id></action>
            </block>
        </reference>
    </cms_page>

[/xml]

 

After that, in the phtml template file, add this line where the static block should be visible:

[php]

<?php echo $this->getChildHtml(‘banner’)?>

[/php]

Now refresh the page and be amazed! (watch out for cache)