コード例 #1
0
 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);
             }
         }
     }
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 protected override void Clear()
 {
     //root = null;
     base.Clear();
     rootNode = null;
 }
コード例 #4
0
 public MySiteMapProvider(SiteMapNodeHelper root)
 {
     this.rootNode = root;
 }