Question

So I have the in my category->Display Settings->Display Mode set to "Static block only"

And category->Design->Layout set to "1 column"

And category->Design->Layout Update XML

   <referenceContainer name="content">
     <referenceBlock name="sidebar.main" remove="true"/>
     <referenceBlock name="sidebar.additional" remove="true"/>
   </referenceContainer >

And sidebar.additional doesn't get removed, But what I notice is if I remove only one of them at time it works but I need to remove both.

What am I dong wrong with the xml updated?

Any help Please Appreciate.

Was it helpful?

Solution

The only solution It worked for me was xml update by removing catalog.leftnav e.g

 <referenceContainer name="content">
     <referenceBlock name="catalog.leftnav" remove="true"/>
 </referenceContainer >

OTHER TIPS

Just use

<referenceBlock name="sidebar.main" remove="true"/>
<referenceBlock name="sidebar.additional" remove="true"/>

without wrapping in <referenceContainer name="content"> and everything will work.

In case, i am suggesting to make Anchor field Value at Display Setting to NO .

,Bcoz by default at magento2Anchor field value is set As YES.

I have also check same scenario at magento 1.X.If you category has Products and Display Setting* to YES and Display setting is only static block.Then on left panel ,you will layer navigations and right section CMS static block.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top