Try the Demo

Magento Forum

   
Adding a static block on phtml page in magento
 
vishalni85
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2010-12-22
 

Call a CMS block in phtml page
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('get_know_toesox')->toHtml() ?>

Call a image on phtml page
<img src="<?php echo $this->getSkinUrl('images/facebook-login-img.jpg')?>” alt="” />

Call a image in admin csm page/block
<img src="{{skin url=’images/free_shipping_callout.jpg’}}” alt="” />

Call a blog in other block
{{block type="cms/block" block_id="home-page-promo"}}

Call a block in xml file
<block type="cms/block" name="left_share_yahoo" after="-">
<action method="setBlockId"><block_id>left_share_yahoo</block_id></action>
</block>

Page link url on phtml page
<a href="<?php echo $this->getUrl('aboutus') ?>"></a>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top