2009-04-06
Magento 里添加页面子静态区块(Static block)的方法
Call Sub Static blocks direct from phtml pages (eg. add a Staitic block to Newsletter phtml ).
1. Create a cms block in backoffice, and specify the block id, in this case is "newsletter_text".
2. Define block in newsletter.xml, not in cms.xml or page.xml.
- 代码:
<default>
<reference name="right.newsletter">
<block type="cms/block" name="newletter_blocks" as="newletter_blocks" after="-">
<action method="setBlockId"><block_id>newsletter_text</block_id></action>
</block>
</reference>
</default>
3. Call block on whereever of subscribe.phtml page

