cancel
Showing results for 
Search instead for 
Did you mean: 

Children of subcategories in menu.. How can i do?

Children of subcategories in menu.. How can i do?

By default, Magento 2 shows the subcategories as main menu items .. but is there a way that also shows the children of these?
My idea is to have 3 categories, for example X,Y and Z (which are shown in the menu) but also have a category called "All Products" that is the father of the previous ones and to be able to filter them on the page of the same category All Products

5 REPLIES 5

Re: Children of subcategories in menu.. How can i do?

@mauri_mono Can you please share the structure how you want to show categories on navigation.

 

Just share one example.

 

Thanks

Re: Children of subcategories in menu.. How can i do?

Hi @rahul_gupta Mi idea is, that the Menu shows for example: << Category X | Category Y | Category Z | All Products >> With the detail that the category "All Products" shows the filter of the first 3 categories

Re: Children of subcategories in menu.. How can i do?

@mauri_mono Then in that case i am expecting "All Products" will be the parent categoery of Category X,Y,Z

 

Am i right?

Re: Children of subcategories in menu.. How can i do?

Yes, but I want X Y and Z to be displayed on the menu at the same level as All products, is that possible? EDIT: I tap on accept the solution but unintentionally

Re: Children of subcategories in menu.. How can i do?

@mauri_mono Yes you can do that.

 

You have to do some customisation in the TopMenu.php file which is responsible for creating the html of navigation.

 

Thanks