How to load the block with Header,Footer,Left navigation, Right navigation in magento 2?
How to load the block with Header, Footer, Left navigation, Right navigation in Magento 2?
step by step please tell me
Solutions
Create cms block and add that block id in your layout file , i.e You have created new cms block and its id is custom-block
and you want to add that block in footer then in your theme's default.xml file add block code :
<!-- Footer Section -->
<referenceContainer name="footer" htmlClass="footer content">
<container name="footer-col3" htmlTag="div" htmlClass="col-lg-12">
<block class="Magento\Cms\Block\Block" name="footer-custom" before="-">
<arguments>
<argument name="block_id" xsi:type="string">custom-block</argument>
</arguments>
</block>
</container>
</referenceContainer>
so this piece of code :
<block class="Magento\Cms\Block\Block" name="block-custom" before="-">
<arguments>
<argument name="block_id" xsi:type="string">custom-block</argument>
</arguments>
</block>
you would need to add where ever you need to call that block :
NOTE : change block name "footer-custom" for other sections , otherwise it will load that block only once.