- CMS block calling from layout.
block_id = CMS block identifier
1 2 3 4 5 6 7 |
<referenceContainer name="content"> <block class="Magento\Cms\Block\Block" name="block_identifier"> <arguments> <argument name="block_id" xsi:type="string">block_identifier</argument> </arguments> </block> </referenceContainer> |
2. CMS static block in phtml file in Magento 2
1 2 3 4 5 6 |
<?php echo $this->getLayout() ->createBlock('Magento\Cms\Block\Block') ->setBlockId('block_identifier') ->toHtml(); ?> |
3. Call CMS block in CMS page or CMS block
1 |
{{block class="Magento\\Cms\\Block\\Block" block_id="block_identifier"}} |