private static MenuItem CreateSiteMenuItem(Site site) { MenuItem menuItem = new SiteMenuItem(site); List <MenuItem> items = new List <MenuItem>(); menuItem.Items = items; foreach (var child in Kooboo.CMS.Sites.Services.ServiceFactory.SiteManager.ChildSites(site)) { items.Add(CreateSiteMenuItem(child)); } return(menuItem); }
private static MenuItem CreateSiteMenuItem(Site site) { MenuItem menuItem = new SiteMenuItem(site); List<MenuItem> items = new List<MenuItem>(); menuItem.Items = items; foreach (var child in Kooboo.CMS.Sites.Services.ServiceFactory.SiteManager.ChildSites(site)) { items.Add(CreateSiteMenuItem(child)); } return menuItem; }