Close

Limit sub-category-sublist

peysche
7 years ago
#13189 Quote
Avatar
  • 2
Hi,

Is it possible to limit the list of sub category's marked red in the Picture ?

If there are to many Subs it looks ugly, marked yellow.

I like to have it as in the MegaMenue markd Yellow with green check



Thx
Paul
anton_ivanov
7 years ago
#13206 Quote
Avatar
  • Moderator
  • 277
Hello,

There is no setting for limiting this subcategory list. However, you can use CSS code to do that.
You should go to Administration -> Nop-Templates -> Themes -> Pavilion and add the following code in Custom Head Styles:

.category-grid .item-grid .item-box .sub-category-details .sub-category-sublist  li:nth-child(n+2){
  display:none;
}


This will only show one subcategory. If you want to show 3 for example you will have to change the "li:nth-child(n+2)" to "li:nth-child(n+4)".

Hope that helps!
Regards,
Anton Ivanov
Nop-Templates.com
peysche
7 years ago
#13208 Quote
Avatar
  • 2
Hi Anton,

THX!

Works like a Charme !

I learnd also a new CSS "trick"

Regards,
Paul