Exemplo n.º 1
0
 public virtual IEnumerable <IMenuEntryViewModel> MapFooterOptionalLinksItems(List <FooterOptionalLink> optionalLinksItems)
 {
     return(optionalLinksItems.OrderBy(el => el.Order).Select(li => new OptionalLinkEntryViewModel()
     {
         DisplayName = li.DisplayName,
         Url = _analyticsNavigationUrlHelper.BuildUrl(li, GoogleAnalyticsNavigationUrlProvider.MenuOrigin.Footer),
         UrlTarget = C1Helper.GetUrlTargetValue(li.Target),
         CssClass = C1Helper.GetCssStyleValue(li.CssStyle)
     }).ToList());
 }
Exemplo n.º 2
0
 public virtual IEnumerable <IFooterEntryViewModel> MapFooterItems(List <Footer> footer, Guid?parentId = null)
 {
     return(footer.Where(x => x.ParentId == parentId && C1Helper.IsUrlPagePublished(x.Url)).OrderBy(el => el.Order).Select(li => new FooterEntryViewModel()
     {
         DisplayName = li.DisplayName,
         Url = _analyticsNavigationUrlHelper.BuildUrl(li, footer, GoogleAnalyticsNavigationUrlProvider.MenuOrigin.Footer),
         CssClass = C1Helper.GetCssStyleValue(li.CssStyle),
         UrlTarget = C1Helper.GetUrlTargetValue(li.Target),
         Children = MapFooterItems(footer, li.Id)
     }).ToList());
 }
 public virtual IEnumerable <IMenuEntryViewModel> MapMainMenuItems(List <MainMenu> mainMenuItems, Guid?parentId = null)
 {
     return(mainMenuItems
            .Where(x => x.ParentId == parentId && C1Helper.IsUrlPagePublished(x.Url))
            .OrderBy(el => el.Order)
            .Select(li => new HomeMainMenuEntryViewModel()
     {
         DisplayName = li.DisplayName,
         Url = _analyticsNavigationUrlHelper.BuildUrl(li, mainMenuItems, GoogleAnalyticsNavigationUrlProvider.MenuOrigin.Dropdown),
         Image = MapNavigationImage(GetNavigationImage(li.Id, new CultureInfo(li.SourceCultureName))),
         CssClass = C1Helper.GetCssStyleValue(li.CssStyle),
         UrlTarget = C1Helper.GetUrlTargetValue(li.Target),
         Children = MapMainMenuItems(mainMenuItems, li.Id),
         MenuType = MenuTypeEnum.Principal
     }).ToList());
 }