I am trying to add a static block to the home page of a Magento site using the layout XML file.
I can see how to add and remove block inside a reference, but I am struggling to see how to add it for a specific page, i.e. the home page.
<block type="cms/block" name="home-page-block">
<action method="setBlockId"><block_id>home-page-block</block_id></action>
</block>
How would I wrap this code in the page.xml
file for it to be only used on the homepage?
Or is there a better way? Should the home page be a new template?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…