Created
January 6, 2017 03:12
-
-
Save gelanivishal/5a5b5a7f9be6f0fbe208942158f1ccea to your computer and use it in GitHub Desktop.
Display Static Block in Phtml file & CMS page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{block class="Magento\\Cms\\Block\\Block" block_id="block_identifier"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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