public interface IAdminMenuPlugin : IPlugin
{
/// <summary>
/// Authenticate a user (can he see this plugin menu item?)
/// </summary>
/// <returns></returns>
bool Authenticate();
/// <summary>
/// Build menu item
/// </summary>
/// <returns>Site map item</returns>
SiteMapNode BuildMenuItem();
}
This does no follow the signature for iAdminMenuPlugin (not in 3.10 anyway). The example further up the page uses the correct signature:
ahill775 wrote:
// Implement an admin link
public void BuildMenuItem(MenuItemBuilder menuItemBuilder)
{
menuItemBuilder.Text("Display Name").Url("url path or absolute link").ImageUrl("link to the icon next to menu item");
}
This can be extended to include submenus like this:
public void BuildMenuItem(MenuItemBuilder menuItemBuilder)
{
menuItemBuilder.Text("Menu Name").Url("~/controller/action/");
var items = new List<MenuItem>();
var menu = new MenuItem()
{
Text = "Sub menu name",
Url = "~/controller/action/"
};
items.Add(menu);
menuItemBuilder.Items(items);
}
This only adds items to the 'Plugins' menu though.
My question is, how do we add a new top level menu?
Thanks!