public NavigationItemCollection GetChildItems(int id) { NavigationItemCollection items = new NavigationItemCollection(); foreach (NavigationItem item in Navigations) { if (item.ParentID == id) { items.Add(item); } } return(items); }
public TopLinkSettings2() { Navigations = new NavigationItemCollection(); MaxID = 0; MaxID++; NavigationItem item = new NavigationItem(); item.ID = MaxID; item.Name = "首页"; item.UrlInfo = "index"; item.NewWindow = false; item.OnlyLoginCanSee = false; item.SortOrder = MaxID; item.Type = MaxLabs.bbsMax.Enums.NavigationType.Internal; item.IsTopLink = true; Navigations.Add(item); }
public NavigationSettings() { Navigations = new NavigationItemCollection(); MaxID = 0; //foreach (KeyValuePair<string, string> pair in NavigationSettings.InternalLinks()) //{ // if (pair.Key == "index") // { MaxID++; NavigationItem item = new NavigationItem(); item.ID = MaxID; item.Name = "首页"; item.UrlInfo = "index"; item.NewWindow = false; item.OnlyLoginCanSee = false; item.SortOrder = MaxID; item.Type = MaxLabs.bbsMax.Enums.NavigationType.Internal; Navigations.Add(item); // } //} }