Mega Menu

To enable the Mega Menu will require 2 lines of source code to be commented out.

  1. Open the project in Visual Studio
  2. Navigate to Nop.Web/Controllers/CatalogController.cs and open the file
  3. Around line 209 you find the
    PrepareCategoryNavigation
    method.
  4. Near the bottom of it will look like this.
                    for (int i = 0; i <= breadCrumbIds.Count - 1; i++)
                        if (breadCrumbIds[i] == category.Id)
                            categoryModel.SubCategories.AddRange(PrepareCategoryNavigationModel(category.Id, breadCrumbIds));
    
  5. Now change it to this
                    //for (int i = 0; i <= breadCrumbIds.Count - 1; i++)
                        //if (breadCrumbIds[i] == category.Id)
                            categoryModel.SubCategories.AddRange(PrepareCategoryNavigationModel(category.Id, breadCrumbIds));
    

Last edited Nov 8, 2013 at 8:34 AM by chxz, version 1

Comments

No comments yet.