Skip to content

Instantly share code, notes, and snippets.

@cobbman
Last active December 14, 2015 07:39
Show Gist options
  • Save cobbman/5052291 to your computer and use it in GitHub Desktop.
Save cobbman/5052291 to your computer and use it in GitHub Desktop.
Adding a CMS Static Block to your XML file. xml layout files are located under app/design/default/<your-theme>/layout/
<cms_index_index>
<reference name="content">
<block type="cms/block" name="static_block_name" before="-">
<action method="setBlockId"><block_id>static_block_name</block_id></action>
</block>
</reference>
</cms_index_index>
notes:
<cms_index_index> tells it to only show up on the front page
before="-" tells it to show before all the other blocks on that page (at the top). To put it at the bottom, change it to after="-"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment