A menu item has been added to the main menu via INavigationProvider, but it will not be displayed?

Using Orchard cms 1.5.1 I created a module that contains a controller that selects a list from a web service. I want to add a menu item to the main menu when this module is turned on. For this, I created MainMenu as follows:

public class MainMenu:INavigationProvider { public Localizer T { get; set; } public String MenuName { get { return "main"; } } public void GetNavigation(NavigationBuilder builder) { builder.Add(menu => menu.Add(T("Fetched List"), "4", item => item.Action("Index", "FetchedList"))); } } 

When my module is turned on, navigation will not show this menu item. Am I doing something wrong?

+4
source share
1 answer

Starting with Orchard 1.5.0, INavigationProvider not used to create front-panel menus (it is still used to create an admin menu for the dashboard). You need to implement either IMenuProvider or INavigationFilter . See this David Hayden blog post for some pointers . You can also find good examples in both Orchard.Projections and Orchard.CulturePicker .

+5
source

All Articles