CodePlexProject Hosting for Open Source Software
We are building a Core module that will store a number of settings (remote service URL...) and handle the DAL that will be exposed to dependent modules within a suite we are building within Orchard for our specific vertical market. Would like to edit the
settings from a submenu under Settings in the dashboard area, similar to General, Gallery, Comments, Email... . Have looked at some examples from both Orchard core and 3rd party modules to see how best to do it, and also read the "Add Custom Settings"
documentation by Piotr Szmyd.
Can anyone assist in the simplest way to extend the Orchard Admin menu area? Can we add our own menu and submenu similar to Settings or Navigation as it is extended by the Advanced Menu module (also by Piotr)?
What examples did you look at? From Orchard.Indexing, for example:
public class AdminMenu : INavigationProvider {
public Localizer T { get; set; }
public string MenuName { get { return "admin"; } }
public void GetNavigation(NavigationBuilder builder) {
builder.Add(T("Settings"),
menu => menu.Add(T("Search Index"), "5", item => item.Action("Index", "Admin", new {area = "Orchard.Indexing"})
.Permission(StandardPermissions.SiteOwner)));
}
}
Great! Thanks for this. Was able to add a <New Menu> to both the Admin Menu and a sub-menu to Settings.
Tried adding a <New Sub Menu> to <New Menu> but unable to get it to show and now collapse/expand arrow appears. Any suggestions?
It's worth knowing that when you implement global site settings (as per Piotr's article) a Settings submenu will be created if you specify a unique editor group.
Not sure why your submenu isn't working; you need to post your code.
Thanks for this. All works well using the code posted + a unique editor group. Was able to create menu, sub-menu and local nav (tab) menus within Settings as well.
Are you sure you want to delete this post? You will not be able to recover it later.
Are you sure you want to delete this thread? You will not be able to recover it later.