Magento – Manually Call Static Block from Another Static Block

adminmagento-1.8magento-1.9magento2static-block

How can I call a static block from another static block manually because i have a customized theme.

I also set block from Magento admin panel, it's working but I dont need this admin method

I think I have to put some static block code in the WYSIWYG editor of the static block admin pannel but which code is it?

Best Answer

to output a static block inside another static block, you basically can do two things:

  1. Insert a Widget:
    • in the Editor toolbar, click on insert Widget (2. from the left)
    • Choose Static Block
    • Choose the Block you want to insert

you should end up with a code like this (if you hide the wysiwyg editor)

{{widget type="cms/widget_block" template="cms/widget/static_block/default.phtml" block_id="1"}}

  1. Insert a cms Block directly:

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

Related Topic