コード例 #1
0
 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());
 }
コード例 #2
0
ファイル: EventsAttribute.cs プロジェクト: ziachap/LiveLink
 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());
 }
コード例 #3
0
ファイル: FeedController.cs プロジェクト: ziachap/LiveLink
 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());
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 public override object ProcessValue()
 {
     return(NavigationNode(_umbracoWrapper.AncestorOrSelf(Context.Content, 1)));
 }