Skip to content

Instantly share code, notes, and snippets.

@gelanivishal
Created January 6, 2017 03:12
Show Gist options
  • Save gelanivishal/5a5b5a7f9be6f0fbe208942158f1ccea to your computer and use it in GitHub Desktop.
Save gelanivishal/5a5b5a7f9be6f0fbe208942158f1ccea to your computer and use it in GitHub Desktop.
Display Static Block in Phtml file & CMS page
{{block class="Magento\\Cms\\Block\\Block" block_id="block_identifier"}}
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();?>
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment