How to call static block in CMS page From Magento Admin Panel ?

Magento is comprehensive package for E-Commerce platform. There are a lot complexity involved in making sure everything works fine. A lot of custom changes are required for making recommended changes. Below we have mentioned how to call static block in CMS page within Magento admin panel!

  • First Log in to your Magento admin panel and navigate to CMS➜Static Block

    Static Block in Magento admin panel

  • Then Click on Add New Block from right top corner

    Add new block button in the top right corner

  • Here you can Add Your Block Title and Block Identifier and Select the Store View  for which you want to add this Static block Change Status and change or add new  the Content Field.

    Static Block in Magento add title and block identifier

  • If You are using FTP client or any FileManager, navigate to  app\design\frontend\default\themename\template\page\html folder.
  • Open header.phtml file using any text editor Depending on where exactly you want  to keep  your static block  paste the following code:
    <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('static_block_id')->toHtml() ?>
    where static_block_id is your identifier which you’ve indicated when creating the Static Block

Then save the file carefully and upload to the server. Once it is transferred and than refresh your page and you will see the recommended change in the design now!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *