How to add static block call in phtml , xml and cms page in magento
In your Phtml File in magento
<? php echo $this->getLayout ( ) ->createBlock ( 'cms/block') ->setBlockId ( 'set your block id') ->toHtml ( ) ? >
<? php echo $this->getLayout ( ) ->createBlock ( 'cms/block') ->setBlockId ( 'block-header-top1') ->toHtml ( ) ? >
In your xml file
<reference name="content">
<block type="cms/block" name="home-page-block">
<action method="setBlockId ">add your block id
</block >
</reference >
In Your cms page
{{block type="cms/block" block_id="add your block id "}}
I hope this blog help you to add static block in your magento any suggetion for me please comment it.
0 komentar:
Post a Comment