I am using nopCommerce 3.90 souce. On that, i create one controller and view for test page now i would like to open that particular page directly from Admin Menu.
I am using nopCommerce 3.90 souce. On that, i create one controller and view for test page now i would like to open that particular page directly from Admin Menu.
///////////////////// Note If you want to list your plugin in sub set of plugins menu use "Third party plugins" otherwise use another string instead of that in line: var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
This is very simple You can code like below: In your plugin main class: add this interface to your class: IAdminMenuPlugin after that implement this way:
public void ManageSiteMap(SiteMapNode rootNode) { var menuItem = new SiteMapNode() { SystemName = "YourCustomSystemName", Title = "Plugin Title", ControllerName = "ControllerName", ActionName = "List", Visible = true, RouteValues = new RouteValueDictionary() { { "area", null } }, }; var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins"); if(pluginNode != null) pluginNode.ChildNodes.Add(menuItem); else rootNode.ChildNodes.Add(menuItem); }
///////////////////// Note If you want to list your plugin in sub set of plugins menu use "Third party plugins" otherwise use another string instead of that in line: var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.