lyna
lyna

Reputation: 17

How do I display a CMS static block in my Magento header

In the magento "Admin > CMS > Static Blocks" I have created a new static block. I am trying to figure out how to display it in my header template. I am not having success. I am quite new to magento and don't really have a deep understanding of it. Thanks

Upvotes: 0

Views: 3135

Answers (1)

Pradeep Sanku
Pradeep Sanku

Reputation: 964

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('product_banner')->toHtml() ?>

product_banner is the id(identifier) of your static block you want to call.replace product_banner with your id.

Upvotes: 2

Related Questions