public NavigationController() { _sitecoreContext = new SitecoreContext(); var componentService = new GlobalComponentService(); var headerNavItem = _sitecoreContext.Database.GetItem(new ID(Consts.Ids.HeaderNav)); var footerItem = _sitecoreContext.Database.GetItem(new ID(Consts.Ids.Footer)); _headerNav = componentService.GetFullMenu(headerNavItem).ToList(); _footer = componentService.GetFullMenu(footerItem).ToList(); }
// // GET: /GlobalComponent/ public ActionResult Header() { GlobalComponentService Gh = new GlobalComponentService(); return(View(Gh.GetHeader())); }