Category Navigation & Expanding all nodes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Perfect, worked perfectly in version 1.90.
I made only one change. Rather than change the signature of an overloaded method CreateChildMenu did this same method with the boolean variable suggested. That's got two methods, the first ensuring the evolution of the original version of the application and the second declared with the Boolean variable.
13 years ago
protected void CreateChildMenu(List<Category> breadCrumb, int rootCategoryId, Category currentCategory, int level)

and

protected void CreateChildMenu(List<Category> breadCrumb, int rootCategoryId, Category currentCategory, int level, bool showAllCategories)
13 years ago
robsonmarin, could you post the whole CreateChildMenu Method?
I'm using 1.9 and I'm not sure how to modify the method to make this work. Thanks
13 years ago
Did this and worked in 1.9 :

1. Add the showAllCategories parameter at the end of this method :
protected void CreateChildMenu(List<Category> breadCrumb, int rootCategoryId, Category currentCategory, int level, bool showAllCategories)

2. Add "true" to the end of this :
CreateChildMenu(breadCrumb, 0, currentCategory, 0, true );  // mp added true

3. Add the code below after the following code :
   ......................
   link.HyperLink.Text = Server.HtmlEncode(catName);
                if (padding > 0)
                    link.LiLeftMargin = padding.ToString();   // add the code below this part :

               // ****************** ADD THIS CODE HERE :
                if (showAllCategories)
                {
                    // Show All Categories and their children
                    CreateChildMenu(breadCrumb, category.CategoryId, currentCategory, level, showAllCategories);
                }
                else
                {
                    // Show only Selected Category children
                    for (int i = 0; i <= breadCrumb.Count - 1; i++)
                        if (breadCrumb[i].CategoryId == category.CategoryId)
                            CreateChildMenu(breadCrumb, category.CategoryId, currentCategory, level, showAllCategories);
                }

                // **************** and comment out this code :
                //for (int i = 0; i <= breadCrumb.Count - 1; i++)
                //    if (breadCrumb[i].CategoryId == category.CategoryId)
                //        CreateChildMenu(breadCrumb, category.CategoryId, currentCategory, level);



How can I change the Font for the Main Category Name in the menu.
I want to make the font bigger for the Category Name, and have the sub-category items
have a smaller font.
12 years ago
Hi,

I have some query regarding category navigation display on home page. I modified the main categories in header menu and want to show the categories and sub categories in left navigation when ever the user click on some category in header menu.

For now its happening that if i click on category A , it expands the parent and subcategories associated to category A. However i don't want to show rest of the categories for that particular instance.

I believe that there will be change in CategoryNavigation.ascx.cs , Any guidance in code changes  !!!

Briefly,

I just want to show that category and associated sub categories in left menu which a user clicked in head menu.

Looking for response

Thanks  

adeel
12 years ago
what about nop 2.10...???
12 years ago
Dharmik wrote:
what about nop 2.10...???
12 years ago
Maybe this can help https://www.nopcommerce.com/boards/t/14132/tutorial-creating-a-flyout-categories-menu.aspx
7 years ago
See this link to modify CategoryNavigation.cshtml (v3.8)

https://www.nopcommerce.com/boards/t/992/how-to-make-category-list-expanded-by-default.aspx#185353
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.