چطور می توان از طریق پلاگین یک گزینه منو به بخش مدیریت ناپ کامرس اضافه کرد ؟
>
public bool Authenticate()
{
return true;
}
public SiteMapNode BuildMenuItem() // SiteMapNode is Class in Nop.Web.Framework.Menu
{
var menuItemBuilder = new SiteMapNode()
{
Title = "Title For Menu item", // Title for your Custom Menu Item
Url = "Path of action link", // Path of the action link
Visible = true,
RouteValues = new RouteValueDictionary() { {"Area", "Admin"} }
};
var SubMenuItem = new SiteMapNode() // add child Custom menu
{
Title = "Title For Menu Chile menu item", // Title for your Sub Menu item
ControllerName = "Your Controller Name", // Your controller Name
ActionName = "Configure", // Action Name
Visible = true,
RouteValues = new RouteValueDictionary() { {"Area", "Admin"} },
};
menuItemBuilder.ChildNodes.Add(SubMenuItem);
return menuItemBuilder;
}