Answers for "create static block in magento 2"

1

magento2 add static block in phtml

<?= $block->getChildHtml('my-main-phtml-block-cms') ?>
Posted by: Guest on June-04-2021
0

magento 2 add in static block

<?php    echo $this->getLayout()        ->createBlock(MagentoCmsBlockBlock::class)        ->setBlockId('my_cmsblock_identifier') //replace my_cmsblock_identifier with real CMS bock identifier        ->toHtml();?>
Posted by: Guest on June-04-2021

Code answers related to "create static block in magento 2"

Browse Popular Code Answers by Language