A static block in phtml file of Magento, sometimes we need to do this kind of functionality. For instance whenever you want to add one banner image on right side of callout block.
echo $this->getLayout()->createBlock('cms/block')->setBlockId('banner_image_block_id')->toHtml()
banner_image_block_id is the identifier you have created with static block in magento
Did this post help you?
Tutsplanet brings in-depth and easy tutorials to understand even for beginners. This takes a considerable amount of work. If this post helps you, please consider supporting us as a token of appreciation:
- Just want to thank us? Buy us a Coffee
- May be another day? Shop on Amazon using our links.
Your prices won't change but we get a small commission.
Leave a Reply