I keep forgetting the syntax for Magento CMS, layout XML, and other little PHP snippets. So here we go:
Add a CMS block to another block via XML
<reference name="header">
<block type="cms/block" name="store_banner" as="store_banner">
<action method="setBlockId"><block_id>store_banner</block_id></action>
</block>
</reference> |
<reference name="header">
<block type="cms/block" name="store_banner" as="store_banner">
<action method="setBlockId"><block_id>store_banner</block_id></action>
</block>
</reference>
Source for an image in the skin directory from within a CMS page
<img src="{{skin url='images/image-name.jpg'}}" alt="Keyword loaded text!" /> |
<img src="{{skin url='images/image-name.jpg'}}" alt="Keyword loaded text!" />