// GET: Community public ActionResult Index() { var topNav = new TopNavigation() { CurrentPageText = "My neighbourhood", CurrentPageIcon = "users", MenuLinks = new List <TopNavigation.MenuItem> { new TopNavigation.MenuItem { Text = "My home", SubText = "Building 1701", Link = "", Icon = "home" } } }; var model = new Page() { TopNav = topNav }; return(View(model)); }
public void Get_with_correct_id_should_return_item() { //given var navigationItemId = Guid.NewGuid(); var navigationItem = new TopNavigation { Id = navigationItemId }; //given _context.Setup(x => x.GetItem <NavigationItemsFolder>(It.IsAny <string>(), false, false)) .Returns(new NavigationItemsFolder { Children = new List <TopNavigation> { navigationItem } }); var repository = new TopNavigationRepository(_context.Object); //when var result = repository.Get(navigationItemId); //then result.Id.Should().Be(navigationItemId); result.Should().BeSameAs(navigationItem); }
public KermitShellViewModel(ArtFiller artFiller, TopNavigation topNavigation, Main mainPanel, Search searchPanel, Status statusPanel) { Navigation = topNavigation; Art = artFiller; Main = mainPanel; Search = searchPanel; Status = statusPanel; Title = "Kermit"; }
public ActionResult TopNavigation() { var model = new TopNavigation(); var homeItem = contextRepository.GetHomeItem <INavigationBase>(); model.Pages = homeItem.SubPages.Where(t => !t.HideInNavigation).ToArray(); string socialLinksPath = Sitecore.Context.Site.RootPath + SocialLinksRelativePaths; model.SocialLinks = contentRepository.GetItem <ISocialNavigation>(new Glass.Mapper.Sc.GetItemByPathOptions(socialLinksPath)).SocialLinks; return(View(model)); }
// GET: Building public ActionResult Index() { var model = new TopNavigation() { CurrentPageText = "Building 1701", MenuLinks = new List <TopNavigation.MenuItem> { new TopNavigation.MenuItem { Text = "My community", Link = "~/community", Icon = "users" } } }; return(View(model)); }