示例#1
0
        public ActionResult RenderUncategorisedLinks()
        {
            var links = _navigationItemService.GetViewModels(Root.FooterUncategorisedLinks);

            if (ExistenceUtility.IsNullOrEmpty(links))
            {
                return(EmptyResult());
            }

            return(PartialView("~/Views/Partials/Footer/UncategorisedLinks.cshtml", links));
        }
        public ActionResult RenderBreadcrumbs()
        {
            var visibleOrderedAncestors = CurrentPage.Ancestors()
                                          .Where(x => x.IsVisible())
                                          .OrderBy(x => x.Level)
                                          .ToList();

            var viewModel = new BreadcrumbsViewModel()
            {
                Ancestors   = _navigationItemService.GetViewModels(visibleOrderedAncestors),
                CurrentPage = CurrentPage.Name
            };

            return(PartialView("~/Views/Partials/Breadcrumbs.cshtml", viewModel));
        }