Setting Category Levels

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Hi all,

is there a way to set the number of levels shown in the category list? I'd like to show only the top two categories but the default is every level.

Many thanks,

Stuart
14 years ago
You have to click on the category in the admin panel and when the edit page comes up for it, uncheck the Published checkbox.
14 years ago
depending on what you are trying to acheive, you could create two top level categories and then move all your other categories inside them so they only display when one of the top level categories is selected
14 years ago
Thanks for the advice. Unfortunately un-publishing a category means you never see it!

My question is in regard to the category control (site is http://www.jemofficesupplies.com) which appears on the left in the standard themes.

This is my first nopCommerce site; because space is limited in the left column (I know - I could make it wider but let's ignore that) I would want only the first two levels of the category hierarchy to show in the control. After that I could continue to use the category listings in the main page. Some of the categories are 6 deep.

So is there any quick way to set the number of category levels shown in the category control?

Many thanks!

Stuart
11 years ago
In NopCommerce 2.60 to show n number of category levels goto
GetChildCategoryNavigationModel method find result.Add(model);
insert below the following lines. here i am showing 3 levels root->chid->child.


if(level<3)
     breadCrumb = category != null ? GetCategoryBreadCrumb(category) : new List<Category>();


change the condition according your needs. :)

http://www.elaamart.com
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.