0

I want my cms block in the column.main area of a category page in Magento 2.

This is a 2 column left page. I want my left menu to still show up on the left and my cms to show up in the main area to the right. Currently, it's easy to get the cms on top with the left column below.

Here is what I tried in Category Design Update

<referenceContainer name="columns.main">
            <block class="Magento\Cms\Block\Block" name="Example-Block">
                <arguments>
                    <argument name="block_id" xsi:type="string">Example-Block</argument>
                </arguments>
            </block>
</referenceContainer>

Of course, it didn't work.

I also tried adding <referenceContainer name="columns"> to the top of this code and that made my cms block show up in the main area but it was still lower than my category navigation "shop by" area on the left.

Any help is greatly appreciated.

0

I figured it out. No columns needed.

<referenceContainer name="main">
        <block class="Magento\Cms\Block\Block" name="Example-Block">
            <arguments>
                <argument name="block_id" xsi:type="string">Example-Block</argument>
            </arguments>
        </block>

Example-Block

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.