I have override Module-Catalog into my theme's folder.

I want to add custom blocks in category sidebar. so in catalog_category_View.xml file i have added following code which works if i put it in default.xml file but it doesn't work for catalog_category_view.xml file.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceContainer name="sidebar.additional">
            <block class="Magento\Cms\Block\Block" name="top_left_sidebar">
                    <argument name="block_id" xsi:type="string">top_left_sidebar</argument>

I want to show that block for category page left column only. How can i do that?


3 Answers 3


You don't have to edit your xml files. Just add a cms block to your design layout.

In your Magento Backend go to the category>design insert into the xml layout update area

<referenceContainer name="sidebar.main">
        <block class="Magento\Cms\Block\Block" name="Your_CMS_Block">
                <argument name="block_id" xsi:type="string">Your_CMS_Block</argument>

I always use the same name for both the cms block name and the identifier when I create the block.

The only reason I'd edit the XML for this is if you are building this shop for a client and you don't want them to be able to go in and change what you did.


First ensure that layout file name catalog_category_view.xml v should be lowercase instead of Uppercase.

If it is not worked then changes the referenceContainer name to sidebar.main from sidebar.additional.

Or can do by Widget

Goto admin >Content>Widget . Create a new widget

On this widget select


Layout Updates:

  • Display On:Anchor Categories and All Categories
  • Display On:Non-Anchor Categories and All Categories

enter image description here

and on Widget Options tab select your cms static.

This is best solution

  • Thanks amit for your answer. catalog_category_view.xml name in lower case. Yes i know can be added from admin but in my module if i want to add it through <referenceContainer > then it doesn't work. I did try sidebar.main and sidebar.additional but not working. Did check vendor file and if i add that code in that file it works. As we should not edit vendor file we have rewritten this file in my custom theme folder and adding <referenceContainer name="sidebar.addition"> but not working. What could be the issue?
    – jack
    Commented Nov 15, 2017 at 10:06

Instead on catalog_category_view.xml use catalog_category_view_type_layered.xml to add the container you want to use for the widget

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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