In Magento 1, we can call CMS Block in email templates like that:

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

I try above code for Magento 2, but it does not work.

How can we call CMS Block in email templates?


We can try:

{{block class="Magento\\Cms\\Block\\Block" area='frontend' block_id="mail_include_header"}}

We can see more how to add a block to email: vendor/magento/module-sales/view/frontend/email/shipment_new.html

  • I have two cms block with same identifier for store specific. Is above way will pick store specific block Or we need to pass store-id ? – Atul Aug 24 '18 at 11:46
  • @Atul its store view specific. – Plastikschnitzer Jan 14 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.