Static blocks are easy to include in CMS pages, but what about adding a static block to your Magento template files? This can be especially time saving since editing PHTML files in your Magento template requires FTP transfers and refreshing Magento's cache, and can be rather daunting.
So let's say you'd like to add a banner in your header that will change each week. This is a perfect example of a situation where a static block would be very appropriate. Instead of editing the header.phtml file and refreshing Magento's cache every single week, you can include a static block in the header.phtml file once, and from then on, manage your block content through the admin panel. To add a static block to a PHTML file in your Magento template, just follow the steps below:
1. Create a static block in the admin panel via CMS > Static Blocks
2. Enter the following code into the desired PHTML file in the place where you wish the static block code to appear:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('your-static-block-identifier')->toHtml() ?>
3. Refresh Magento's cache via System > Cache Management.If you have any trouble with this process, check out Magento Expert for quick answers to your Magento question from real Magento experts, for free!


