Adding static block into the header area of Magento Site

Steps to add static block into the header area of Magento Site

Steps for adding block in Admin Panel

1. Go to “CMS > Static Blocks”

2. Click the “Add New” button.

3. Enter the Block Title like “Header Menu”

4. Enter identifier like enter “header-menu”. (all letters will be small)

5. Select the store view.

6. Set status to “Enabled”.

7. Add you block content.

8. Click on “Save Block” button.

Steps for changing in page.xml file

1. Open file “/app/design/frontend/default/yourtheme/layout/page.xml” file.

2. Find header block

top-bar

<label>Page Header</label>
top-container

3. Now add the following block in just before the closing block </block> tag
<block type=”cms/block” name=”header-menu”><action method=”setBlockId”><block_id>header-menu</block_id></action></block>

Steps for changing in header.phtml file

1. Open file “/app/design/frontend/default/yourtheme/page/html/template/header.phtml” file.
2. Just add the following code where you want to add the block
<?php echo $this->getChildHtml(‘header-menu’) ?>

Source : http://bmehla.wordpress.com/2011/05/04/magento-steps-to-add-static-block-into-the-header-area-of-magento-site/