cancel
Showing results for 
Search instead for 
Did you mean: 

How to change Category page layout for specific category only?

How to change Category page layout for specific category only?

Hi!

 

I have category "Deals" and for this category i want to remove, let say sidebar block. How can i remove it programmatically? It works if I update product category design on backend, but this is not what I want. I want to remove blocks with layout change - programmatically, if it's possible.

 

For example, for catalog product view I've created layout in my module/view/frontend/layout/catalog_product_view_type_deals.xml. Is there any similar way to achieve that the same way for only one category?

Kind regards,

Denis 

2 REPLIES 2

Re: How to change Category page layout for specific category only?

Hello

 

Follow the below steps for the solution:

  1. Login to Admin panel
  2. Go to Catalog > Categories
  3. Select any category that you want
  4. Under Design, select the required Layout.
  5. Save configuration.

http://drops.meetanshi.com/1cbb4b

 

Hope it helps.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: How to change Category page layout for specific category only?

Hi Denis,

 

You can change the category page layout from admin in the Magento 2. Check this link it will help you. You just need to select 1 column layout for your category "Deals" by editing this category.

 

Let me know if it will work for you.

 

Thanks

--

Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.