调用static block
三个地方三种方式
phtml中
getLayout()->createBlock(‘cms/block’)->setBlockId(‘block_id’)->toHtml() ?>
XML中
<block type=”cms/block” name=”block_name”>
<action method=”setBlockId”><block_id>test_block</block_id></action>
</block>
CMS中
调用static block
三个地方三种方式
phtml中
getLayout()->createBlock(‘cms/block’)->setBlockId(‘block_id’)->toHtml() ?>
XML中
<block type=”cms/block” name=”block_name”>
<action method=”setBlockId”><block_id>test_block</block_id></action>
</block>
CMS中