Universal WebTech
  • Home
  • About US
    • Our Team
    • Privacy Policy
    • Our Clients
    • Terms of use
  • Service
    • Web Development
    • E-Commerce
    • Android Development
    • UI UX Design
  • Our Portfolio
  • Career
  • Blogs
contact
hamburger

Call static block in Magento

Static block is use to allow store Admin to update content or any block without changing code. Admin can update content from admin-panel easily. We can call static block in different location in Magento. I.e. in CMS page,
any of phtml file, any block etc.

Below are syntax to call static block in different location.

1) Magento: call a static block in a phtml file.

To call a static block in a phtml file you just need to replace static block id in below code. Put this code where you want to call.

echo $this->getLayout()->createBlock('cms/block')->setBlockId('static_block_id')->toHtml();

2) Magento: call a static block in CMS page.

use below code to call static block in CMS page.

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

3) Magento: call static block in xml.

syntex to call static block using xml file

<block type="cms/block" name="home-page-block">
<action method="setBlockId"><block_id>home-page-block</block_id></action>
</block>

Universal WebTech

Universal WebTech IT Solutions is a leading web and mobile development company in Ahmedabad, India that believes in winning trust of its clients through 100% quality service and time-oriented work.

Company

  • About us
  • Careers
  • FAQs
  • Testimonials
  • Blogs
  • Our team

Service

  • Web Development
  • Android Application Development
  • eCommerce Web Development
  • Open Source Customization
  • UI / UX / Logo Design Services

Copyright © 2025 Universal WebTech

  • Terms of use
  • Privacy Policy