How to add a cms static block to all pages in Magento?

22,735

Adding Static and non-static blocks directly to templates:

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

Short code inside another block or cms page :

{{block type="cms/block" block_id="your_block_id"}}

For Reference Visit Here

Share:
22,735
ScoRpion
Author by

ScoRpion

I Work On PHP Symfony2 Magento Zend Fusebox Python OpenERP JavaScript JQuery Ajax ( JQuery And Prototype ) And I am passionate about sketching my new ideas into programming Applications.

Updated on November 28, 2020

Comments

  • ScoRpion
    ScoRpion over 3 years

    I am new to magento and i am trying to create a static block for my home, category and other pages. i want the static block to be shown just above the footer link. And is there any good tutorial on line which can provide a good over view of static blocks. How to use them in CMS and how we can generate them using php Code.