Sunday, 24 November 2019

How to Call CMS Static Block in Phtml File in magento 2

Display CMS Static Block In Phtml File:
<?php
    echo $block->getLayout()
               ->createBlock('Magento\Cms\Block\Block')
               ->setBlockId('block_identifier')
               ->toHtml();
?>

No comments:

Post a Comment