Exemplo n.º 1
0
        private static void PopulateNode(SiteMapNode siteMapNode, XmlNode xmlNode)
        {
            //title
            var nopResource = GetStringValueFromAttribute(xmlNode, "nopResource");
            if (!string.IsNullOrEmpty(nopResource))
            {
                var localizationService = EngineContext.Current.Resolve<ILocalizationService>();
                siteMapNode.Title = localizationService.GetResource(nopResource);
            }
            else
            {
                siteMapNode.Title = GetStringValueFromAttribute(xmlNode, "title");
            }

            //routes, url
            string controllerName = GetStringValueFromAttribute(xmlNode, "controller");
            string actionName = GetStringValueFromAttribute(xmlNode, "action");
            string url = GetStringValueFromAttribute(xmlNode,  "url");
            if (!string.IsNullOrEmpty(controllerName) && !string.IsNullOrEmpty(actionName))
            {
                siteMapNode.ControllerName = controllerName;
                siteMapNode.ActionName = actionName;

                //apply admin area as described here - http://www.nopcommerce.com/boards/t/20478/broken-menus-in-admin-area-whilst-trying-to-make-a-plugin-admin-page.aspx
                siteMapNode.RouteValues = new RouteValueDictionary()
                                          {
                                              {"area", "Admin"}
                                          };
            }
            else if (!string.IsNullOrEmpty(url))
            {
                siteMapNode.Url = url;
            }

            //image URL
            siteMapNode.ImageUrl = GetStringValueFromAttribute(xmlNode, "ImageUrl");

            //permission name
            var permissionNames = GetStringValueFromAttribute(xmlNode, "PermissionNames");
            if (!string.IsNullOrEmpty(permissionNames))
            {
                var permissionService = EngineContext.Current.Resolve<IPermissionService>();
                siteMapNode.Visible = permissionNames.ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                   .Any(permissionName => permissionService.Authorize(permissionName.Trim()));
            }
            else
            {
                siteMapNode.Visible = true;
            }
        }
Exemplo n.º 2
0
        private static void Iterate(SiteMapNode siteMapNode, XmlNode xmlNode)
        {
            PopulateNode(siteMapNode, xmlNode);

            foreach (XmlNode xmlChildNode in xmlNode.ChildNodes)
            {
                if (xmlChildNode.LocalName.Equals("siteMapNode", StringComparison.InvariantCultureIgnoreCase))
                {
                    var siteMapChildNode = new SiteMapNode();
                    siteMapNode.ChildNodes.Add(siteMapChildNode);

                    Iterate(siteMapChildNode, xmlChildNode);
                }
            }
        }
Exemplo n.º 3
0
        public void ManageSiteMap(SiteMapNode rootNode)
        {
            var lltMenuItem = new SiteMapNode()
            {
                Title = "LLT",
                Url = "/PlayerAdmin/List",
                Visible = true,
                RouteValues = new RouteValueDictionary() { { "Area", "Admin" } }
            };

            var playersMenuUtem = new SiteMapNode()
            {
                SystemName = "LLT",
                Title = "Players",
                Url = "/PlayerAdmin/List",
                Visible = true,
                RouteValues = new RouteValueDictionary() { { "Area", "Admin" } }
            };
            lltMenuItem.ChildNodes.Add(playersMenuUtem);

            var tournamentsMenuUtem = new SiteMapNode()
            {
                SystemName = "LLT",
                Title = "Tournaments",
                Url = "/TournamentAdmin/List",
                Visible = true,
                RouteValues = new RouteValueDictionary() { { "Area", "Admin" } }
            };
            lltMenuItem.ChildNodes.Add(tournamentsMenuUtem);

            //var excludedFromDefaultMenuItem = new SiteMapNode()
            //{
            //    SystemName = "VirginPulse",
            //    Title = "Excluded from Default Role",
            //    Url = "/Shop/ExcludedFromDefault/ManageExcluded",
            //    Visible = true,
            //    RouteValues = new RouteValueDictionary() { { "Area", "Admin" } }
            //};
            //virginPulseMenuItem.ChildNodes.Add(excludedFromDefaultMenuItem);

            var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
            if (pluginNode != null)
                pluginNode.ChildNodes.Add(lltMenuItem);
            else
                rootNode.ChildNodes.Add(lltMenuItem);
        }
        public SiteMapNode BuildMenuItem()
        {
            var menuItem = new Nop.Web.Framework.Menu.SiteMapNode()
            {
                Title          = _localizationService.GetResource("Plugins.Widgets.MobSocial.AdminMenu.Text"),
                ControllerName = "TeamPage",
                ActionName     = "Index",
                Visible        = true,
                RouteValues    = new RouteValueDictionary()
                {
                    { "area", null }
                },
            };

            var manageTeamSubMenu = new Nop.Web.Framework.Menu.SiteMapNode()
            {
                Title          = _localizationService.GetResource("Plugins.Widgets.MobSocial.AdminMenu.SubMenu.ManageTeamPage"),
                ControllerName = "TeamPage",
                ActionName     = "Index",
                Visible        = true,
                RouteValues    = new RouteValueDictionary()
                {
                    { "area", null }
                },
            };



            var manageEventsSubMenu = new Nop.Web.Framework.Menu.SiteMapNode()
            {
                Title          = _localizationService.GetResource("Plugins.Widgets.MobSocial.AdminMenu.SubMenu.ManageEventPage"),
                ControllerName = "ManageEventPage",
                ActionName     = "List",
                Visible        = true,
                RouteValues    = new RouteValueDictionary()
                {
                    { "area", null }
                },
            };

            menuItem.ChildNodes.Add(manageTeamSubMenu);
            menuItem.ChildNodes.Add(manageEventsSubMenu);


            return(menuItem);
        }
Exemplo n.º 5
0
        public void ManageSiteMap(SiteMapNode rootNode)
        {
            // if plugin is not installed, run database creation script
            if (!PluginHelper.IsPluginInstalled())
            {
                this.Install();
            }

            var RootMenu = new SiteMapNode()
            {
                SystemName = "Tameion.SupportTicketSystem",
                Title = "Support Tickets",
                Visible = true,
                RouteValues = new RouteValueDictionary() { { "area", "Admin" } },
                ChildNodes = new List<SiteMapNode>
                {
                    new SiteMapNode()
                    {
                        SystemName = "Tameion.SupportTicketSystem",
                        Title = "Tickets",
                        Url = "Admin/Tickets/Index",
                        ControllerName = "Tickets",
                        ActionName = "Index",
                        Visible = true,
                        RouteValues = new RouteValueDictionary() { { "area", "Admin" } },
                    },

                    new SiteMapNode()
                    {
                        SystemName = "Tameion.SupportTicketSystem",
                        Title = "Create Ticket",
                        Url = "Admin/Tickets/Create",
                        ControllerName = "Tickets",
                        ActionName = "Create",
                        Visible = true,
                        RouteValues = new RouteValueDictionary() { { "area", "Admin" } },
                    }
                }
            };

            var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Tameion.SupportTicketSystem");
            if (pluginNode != null)
                pluginNode.ChildNodes.Add(RootMenu);
            else
                rootNode.ChildNodes.Add(RootMenu);
        }
Exemplo n.º 6
0
        public void ManageSiteMap(SiteMapNode rootNode)
        {
            //// if plugin is not installed, run database creation script
            //if (!PluginHelper.IsPluginInstalled())
            //{
            //    this.Install();
            //}

            //var RootMenu = new SiteMapNode()
            //{
            //    SystemName = "Misc.GroupDeals",
            //    Title = "Group Deals",
            //    Visible = true,
            //    ChildNodes = new List<SiteMapNode>
            //    {
            //        new SiteMapNode()
            //        {
            //            SystemName = "Misc.GroupDeals",
            //            Title = "Manage Group Deals",
            //            Url = "/Groupdeals/Index",
            //            ControllerName = "Groupdeals",
            //            ActionName = "Index",
            //            Visible = true,
            //            RouteValues = new RouteValueDictionary() { { "area", "Admin" } },
            //        },

            //        new SiteMapNode()
            //        {
            //            SystemName = "Misc.GroupDeals",
            //            Title = "Add New",
            //            Url = "/Groupdeals/Create",
            //            ControllerName = "Groupdeals",
            //            ActionName = "Create",
            //            Visible = true,
            //            RouteValues = new RouteValueDictionary() { { "area", "Admin" } },
            //        }
            //    }
            //};

            //var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Misc.GroupDeals");
            //if (pluginNode != null)
            //    pluginNode.ChildNodes.Add(RootMenu);
            //else
            //    rootNode.ChildNodes.Add(RootMenu);
        }
Exemplo n.º 7
0
        public void ManageSiteMap(Nop.Web.Framework.Menu.SiteMapNode rootNode)
        {
            var menuItem = new Nop.Web.Framework.Menu.SiteMapNode()
            {
                SystemName     = "TodoPago",
                Title          = "TodoPago",
                ControllerName = "Plugins/PaymentTodoPago",
                ActionName     = "List",
                Visible        = true,
                //RouteValues = new RouteValueDictionary() { { "area", "Admin" } },
                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);
        }
        //Legacy method from version 3.50
        public SiteMapNode BuildMenuItem()
        {
           
            //************************************** Consignor **********************************
            //parentNode
            var parentNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Auction",
                Url = "/AUConsignor/Auction"
            };

            //first child node goes to same place as parent
            var consignorNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Consignor",
                Url = "/AUConsignor/CreateUpdateConsignor"
            };

            //first child node goes to same place as parent
            var cuConsignorNode = new SiteMapNode()
            {
                Visible = true,
                Title = "New Consignor",
                Url = "/AUConsignor/CreateUpdateConsignor"
            };


            //second child node goes a different place
            var mngConsignorNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Manage Consignors",
                Url = "/AUConsignor/ManageConsignors"
            };

            consignorNode.ChildNodes.Add(cuConsignorNode);
            consignorNode.ChildNodes.Add(mngConsignorNode);



            //************************************** Consignment **********************************

            //first child node goes to same place as parent
            var consignmentNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Consignnment",
                Url = "/AUConsignor/CreateUpdateConsignment"
            };

            //***-->Got rid of this node as only want to enter through consignor
            //first child node goes to same place as parent
            //var cuConsignmentNode = new SiteMapNode()
            //{
            //    Visible = true,
            //    Title = "New Consignment",
            //    Url = "/AUConsignor/CreateUpdateConsignment"
            //};


            //second child node goes a different place
            var mngConsignmentNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Manage Consignments",
                Url = "/AUConsignor/ManageConsignments"
            };


            //consignmentNode.ChildNodes.Add(cuConsignmentNode);
            consignmentNode.ChildNodes.Add(mngConsignmentNode);


            //************************ Sale *******************************************
            //first child node goes to same place as parent
            var saleNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Sale",
                Url = "/AUConsignor/CreateUpdateSale"
            };

            //first child node goes to same place as parent
            var cuSaleNode = new SiteMapNode()
            {
                Visible = true,
                Title = "New Sale",
                Url = "/AUConsignor/CreateUpdateSale"
            };


            //second child node goes a different place
            var mngSaleNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Manage Sales",
                Url = "/AUConsignor/ManageSales"
            };


            saleNode.ChildNodes.Add(cuSaleNode);
            saleNode.ChildNodes.Add(mngSaleNode);

            //*******************Address*******************************************************
            var addressNode = new SiteMapNode()
            {
                Visible = true,
                Title = "Address",
                Url = "/AUConsignor/CreateUpdateAddress"
            };

            
            
            //*********************** add the child nodes to the parent *********************
            parentNode.ChildNodes.Add(consignorNode);
            parentNode.ChildNodes.Add(consignmentNode);
            parentNode.ChildNodes.Add(saleNode);
            parentNode.ChildNodes.Add(addressNode); 
            
            return parentNode;

        }
Exemplo n.º 9
0
 public XmlSiteMap()
 {
     RootNode = new SiteMapNode();
 }
Exemplo n.º 10
0
 public Web.Framework.Menu.SiteMapNode BuildMenuItem()
 {
     SiteMapNode node = new SiteMapNode { Visible = true, Title = "Group Deals", Url = "/Groupdeals/Index" };
     return node;
 }
 public void ManageSiteMap(SiteMapNode rootNode)
 {
 }
Exemplo n.º 12
0
 public XmlSiteMap(string areaMenu)
 {
     RootNode  = new SiteMapNode();
     _areaMenu = areaMenu;
 }
 // Admin Menu for BPAY Plugin
 public void ManageSiteMap(SiteMapNode rootNode)
 {
     var menuItem = new SiteMapNode()
     {
         SystemName = "Payments.BPay",
         Title = "BPAY Payment",
         Url = "/Admin/Payment/ConfigureMethod?systemName=Payments.BPay",
         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);
 }
        public void ManageSiteMap(SiteMapNode rootNode)
        {
            var promosNode = rootNode.ChildNodes.Where(cn => cn.SystemName == "Promotions").FirstOrDefault();
            if (promosNode != null)
            {
                // It's not inconceivable that hiding the standard menu entries would be annoying to some users (i.e. they already have some discounts 
                // set up and so want to be able to configure them!).  As a result, made this switchable based on a (hidden) setting.
                if (_promoSettings.HideNopDiscountMenuItems)
                {
                    var discountsNode = promosNode.ChildNodes.Where(cn => cn.SystemName == "Discounts").FirstOrDefault();
                    if (discountsNode != null)
                        discountsNode.Visible = false;

                    var campaignsNode = promosNode.ChildNodes.Where(cn => cn.SystemName == "Campaigns").FirstOrDefault();
                    if (campaignsNode != null)
                        campaignsNode.Visible = false;
                }

                promosNode.ChildNodes.Add(new SiteMapNode()
                    {
                        Title = _localizationService.GetResource("Plugins.Misc.QixolPromo.PromotionsMenu.Integration"),
                        ControllerName = "Plugin",
                        ActionName = "ConfigureMiscPlugin",
                        RouteValues = new RouteValueDictionary(new { systemName = "Misc.QixolPromo" }),
                        Visible = true
                    });

                var installedPlugins = _pluginFinder.GetPluginDescriptors<IWidgetPlugin>(loadMode: LoadPluginsMode.InstalledOnly, group: "Qixol Promo");
                if (installedPlugins.Any(p => p.SystemName == "Widgets.QixolPromo"))
                {
                    promosNode.ChildNodes.Add(new SiteMapNode()
                    {
                        Title = _localizationService.GetResource("Plugins.Misc.QixolPromo.PromotionsMenu.Widgets"),
                        ControllerName = "Widget",
                        ActionName = "ConfigureWidget",
                        RouteValues = new RouteValueDictionary(new { systemName = "Widgets.QixolPromo" }),
                        Visible = true
                    });
                }

                promosNode.ChildNodes.Add(new SiteMapNode()
                {
                    Title = _localizationService.GetResource("Plugins.Misc.QixolPromo.PromotionsMenu.Promo"),
                    Url = "http://admin.qixolpromo.com",
                    Visible = true
                });
            }
        }
Exemplo n.º 15
0
        public void ManageSiteMap(SiteMapNode rootNode)
        {
            // if plugin is not installed, run database creation script
            if (!PluginHelper.IsPluginInstalled())
            {
                this.Install();
            }

            var RootMenu = new SiteMapNode()
            {
                SystemName = "Misc.TaxGroups",
                Title = "GroupS & Taxes",
                Visible = true,
                RouteValues = new RouteValueDictionary() { { "area", null } },
                ChildNodes = new List<SiteMapNode>
                {
                    //Group Rules menu
                    new SiteMapNode()
                    {
                        SystemName = "Misc.TaxGroups",
                        Title = "Group Rules",
                        Visible = true,
                        RouteValues = new RouteValueDictionary() { { "area", null } },
                        ChildNodes = new List<SiteMapNode> 
                        { 
                            new SiteMapNode
                            {
                                SystemName = "Misc.TaxGroups",
                                Title = "Manage Rules",
                                Url = "/GroupRules/Index",
                                ControllerName = "GroupRules",
                                ActionName = "Index",
                                Visible = true,
                                RouteValues = new RouteValueDictionary() { { "area", null } },
                            },
                            new SiteMapNode()
                            {
                                SystemName = "Misc.TaxGroups",
                                Title = "Add New Rule",
                                Url = "/GroupRules/AddNew",
                                ControllerName = "GroupRules",
                                ActionName = "AddNew",
                                Visible = true,
                                RouteValues = new RouteValueDictionary() { { "area", null } },
                            }
                        }
                    },

                    //Taxes menu
                    new SiteMapNode()
                    {
                        SystemName = "Misc.TaxGroups",
                        Title = "Taxes",
                        Visible = true,
                        RouteValues = new RouteValueDictionary() { { "area", null } },
                        ChildNodes = new List<SiteMapNode>
                        {
                            new SiteMapNode
                            {
                                SystemName = "Misc.TaxGroups",
                                Title = "Manage Tax Rules",
                                Visible = true,
                                RouteValues = new RouteValueDictionary() { { "area", null } },
                            },
                            new SiteMapNode
                            {
                                SystemName = "Misc.TaxGroups",
                                Title = "Manage Tax Zones & Rates",
                                Visible = true,
                                RouteValues = new RouteValueDictionary() { { "area", null } },
                            },
                            new SiteMapNode
                            {
                                SystemName = "Misc.TaxGroups",
                                Title = "Tax Classes",
                                Visible = true,
                                RouteValues = new RouteValueDictionary() { { "area", null } },
                            }
                        }
                    }
                }
            };

            var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Misc.TaxGroups");
            if (pluginNode != null)
                pluginNode.ChildNodes.Add(RootMenu);
            else
                rootNode.ChildNodes.Add(RootMenu);
        }
        //New method in Version 3.60
        public void ManageSiteMap(SiteMapNode rootNode)
        {


            //var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");

            var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Auction");
            if (pluginNode == null)
            {
                //NJM: Need to make default page for high level entry point
                var menuItem = new SiteMapNode()
                {
                    SystemName = "AUAuction",
                    Title = "Auction",
                    ControllerName = "AUConsignor",
                    ActionName = "CreateUpdateConsignor",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } },
                };

                rootNode.ChildNodes.Add(menuItem);
                pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "AUAuction");
            }
            
            if (pluginNode != null)
            {

                //CONSIGNORS
                var newNode = new SiteMapNode()
                {
                    Title = "Consignors",
                    ControllerName = "AUConsignor",
                    ActionName = "ManageConsignors",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } }
                };

                newNode.ChildNodes.Add(new SiteMapNode()
                {
                    Title = "Create Consignor",
                    ControllerName = "AUConsignor",
                    ActionName = "CreateUpdateConsignor",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } },
                });

                newNode.ChildNodes.Add(new SiteMapNode()
                {
                    Title = "Manage Consignors",
                    ControllerName = "AUConsignor",
                    ActionName = "ManageConsignors",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } },
                });

                pluginNode.ChildNodes.Add(newNode);

                //CONSIGNMENTS
                var newNode2 = new SiteMapNode()
                {
                    Title = "Consignments",
                    ControllerName = "AUConsignor",
                    ActionName = "ManageConsignments",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } }
                };

                newNode2.ChildNodes.Add(new SiteMapNode()
                {
                    Title = "Manage Consignments",
                    ControllerName = "AUConsignor",
                    ActionName = "ManageConsignments",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } },
                });

                
                pluginNode.ChildNodes.Add(newNode2);

                //SALES
                var newNode3 = new SiteMapNode()
                {
                    Title = "Sales",
                    ControllerName = "AUConsignor",
                    ActionName = "ManageSales",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } }
                };

                newNode3.ChildNodes.Add(new SiteMapNode()
                {
                    Title = "Create Sale",
                    ControllerName = "AUConsignor",
                    ActionName = "CreateUpdateSale",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } },
                });

                newNode3.ChildNodes.Add(new SiteMapNode()
                {
                    Title = "Manage Sales",
                    ControllerName = "AUConsignor",
                    ActionName = "ManageSales",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } },
                });

                newNode3.ChildNodes.Add(new SiteMapNode()
                {
                    Title = "Create Sale Address",
                    ControllerName = "AUConsignor",
                    ActionName = "CreateUpdateAddress",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } },
                });

                pluginNode.ChildNodes.Add(newNode3);

                //LOTS
                var newNode4 = new SiteMapNode()
                {
                    Title = "Lots",
                    ControllerName = "AUConsignor",
                    ActionName = "LotIndex",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } }
                };

                //NJM: this will come later
                //newNode4.ChildNodes.Add(new SiteMapNode()
                //{
                //    Title = "Create Lot",
                //    ControllerName = "AUConsignor",
                //    ActionName = "CreateUpdateLot",
                //    Visible = true,
                //    RouteValues = new RouteValueDictionary() { { "area", null } },
                //});

                newNode4.ChildNodes.Add(new SiteMapNode()
                {
                    Title = "Manage Lots",
                    ControllerName = "AUConsignor",
                    ActionName = "ListLots",
                    Visible = true,
                    RouteValues = new RouteValueDictionary() { { "area", null } },
                });

                pluginNode.ChildNodes.Add(newNode4);

                //--------
            }
        }
 public void ManageSiteMap(SiteMapNode rootNode)
 {
     var menuItem = BuildMenuItem();
     var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
     if (pluginNode != null)
         pluginNode.ChildNodes.Add(menuItem);
     else
         rootNode.ChildNodes.Add(menuItem);
 }
        public SiteMapNode BuildMenuItem()
        {
            var menuItemBuilder = new SiteMapNode() {
                Title = "Extended Vendor & Ratings",   // Title for your Custom Menu Item
                SystemName = "RoastedBytes.Plugin.ExtendedVendor",
                Url = "", // Path of the action link
                Visible = true,
                RouteValues = new RouteValueDictionary() { { "Area", "Admin" } }
            };

            var SubMenuItem = new SiteMapNode()   // add child Custom menu
               {
                   Title = "Configure", //   Title for your Sub Menu item
                   Url = "~/Admin/Widget/ConfigureWidget?systemName=RoastedBytes.Plugin.ExtendedVendor",
                   Visible = true,
                   RouteValues = new RouteValueDictionary() { { "Area", "Admin" } },
               };
            menuItemBuilder.ChildNodes.Add(SubMenuItem);

            SubMenuItem = new SiteMapNode()   // add child Custom menu
                {
                    Title = "Help", //   Title for your Sub Menu item
                    Visible = true,
                    Url = "http://docs.roastedbytes.com/",
                    RouteValues = new RouteValueDictionary() { { "Area", "Admin" } },
                };
            menuItemBuilder.ChildNodes.Add(SubMenuItem);

            return menuItemBuilder;
        }
Exemplo n.º 19
0
 /// <summary>
 /// Ctor
 /// </summary>
 public XmlSiteMap()
 {
     RootNode = new SiteMapNode();
 }