private void buildNode(IList <DynamicMenu> menus, SiteMapNodeHelper parent) { if (parent == null) { return; } if (menus == null) { return; } for (int i = 0; i < menus.Count; i++) { DynamicMenu menu = menus[i]; if (menu.Show && menu.SeqNo >= 0) { SiteMapNodeHelper child = new SiteMapNodeHelper(this, menu.Id, menu.Code, menu.PageCode, menu.LinkURL, null); AddNode(child, parent); if (menu.Children.Count > 0) { //child.Url = ""; buildNode(menu.Children, child); } } } }
public override SiteMapNode BuildSiteMap() { if (base.RootNode == null) { if (rootNode == null) { this.Clear(); rootNode = new SiteMapNodeHelper(this, 0, "Home", "Home", "~/default.aspx", null); buildNode(this.menus, this.rootNode); } } return(rootNode); }
protected override void Clear() { //root = null; base.Clear(); rootNode = null; }
public MySiteMapProvider(SiteMapNodeHelper root) { this.rootNode = root; }