MAGENTO2

How to call static block in phtml magento2?

to call a static block content in an phtml page , the below code is done in the phtml

$this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('flashdeal')->toHtml();

Leave a Reply

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

6 + eleven =