public override object ProcessValue() { return(_umbracoWrapper.AncestorOrSelf(Context.Content, 1) .Children.First(x => x.DocumentTypeAlias.Equals("locations")) .Children() .Where(x => x.Children.Any()) .Select(x => _modelConverter.ToModel <LocationOption>(x)) .ToList()); }
public override object ProcessValue() { return(_umbracoWrapper.AncestorOrSelf(Context.Content, 1) .Children.First(x => x.DocumentTypeAlias.Equals("locations")) .Descendants() .Where(x => x.DocumentTypeAlias == "venue") .SelectMany(x => x.Children) .Select(x => _modelConverter.ToModel <EventViewModel>(x)) .ToList()); }
public IEnumerable <LocationOption> Countries(IPublishedContent content, GetEventsConfiguration configuration) { return(_umbracoWrapper.AncestorOrSelf(content, 1) .Children .First(x => x.DocumentTypeAlias.Equals("locations")) .Children .Where(x => x.Children.Any()) .Select(x => Option(x, configuration.CountryId)) .ToList()); }
public SubNavigationModel <T> GetSubNavigation(string url) { var content = _umbracoWrapper.TypedContent(url.TrimEnd('/')); if (content == null) { return(null); } var model = new SubNavigationModel <T>(); var topLevelParent = _umbracoWrapper.AncestorOrSelf(content, 2); model.SectionParent = _modelConverter.ToModel <UmbracoNavigationElement>(topLevelParent); model.NavigationElements = GetNavigationElements(topLevelParent); return(model); }
public override object ProcessValue() { return(NavigationNode(_umbracoWrapper.AncestorOrSelf(Context.Content, 1))); }