When I create a static page with 2columns-left layout in magento, it has the space of sidebar on the left. How can I put a static block in this sidebar so it can appear in every page with 2 columns?
1 Answer
Your XML file code should be:
<referenceContainer name="sidebar.additional">
<block class="Magento\Cms\Block\Block" name="yourblockid">
<arguments>
<argument name="block_id" xsi:type="string">yourblockid</argument>
</arguments>
</block>
</referenceContainer>