public override object ProcessValue() { var content = _processorAttributeHelper.ResolveContent <bool>(Alias, Context); if (content) { return(true); } return(null); }
public override object ProcessValue() { if (Context.Content == null) { return(null); } var nodes = _processorAttributeHelper.ResolveContent <IEnumerable <IPublishedContent> >(Alias, Context).ToList(); return(nodes.FirstOrDefault()); }
public override object ProcessValue() { if (Context.Content == null) { return(null); } var content = _processorAttributeHelper.ResolveContent <IEnumerable <IPublishedContent> >(Alias, Context); return(content?.Select(nestedContentItem => nestedContentItem.GetPropertyValue <DateTime>("excludedDate")).ToList()); }
public override object ProcessValue() { if (Context.Content == null) { return(null); } // Since it's a Multinode Treepicker it returns a IEnumerable even though it's only possible to pick one. var nodesInMultiTreePicker = _processorAttributeHelper.ResolveContent <IEnumerable <IPublishedContent> >(Alias, Context).ToList(); var node = nodesInMultiTreePicker.FirstOrDefault(); return(node?.Url); }
public override object ProcessValue() { if (Context.Content == null) { return(null); } var dateTime = _processorAttributeHelper.ResolveContent <DateTime>(Alias, Context); if (dateTime == DateTime.MinValue) { return(null); } return(dateTime.Date); }
public override object ProcessValue() { if (Context.Content == null) { return(null); } var content = _processorAttributeHelper.ResolveContent <IEnumerable <IPublishedContent> >(Alias, Context); return(content?.Select(item => new ExtendedLink { Link = item.GetPropertyValue <IEnumerable <RelatedLink> >("links")?.FirstOrDefault().ToLink(), Subtitle = item.GetPropertyValue <string>("subtitle"), IconId = item.GetPropertyValue <string>("iconId").ToLowerInvariant() }).ToList()); }
public override object ProcessValue() { if (Context.Content == null) { return(null); } var content = _processorAttributeHelper.ResolveContent <IPublishedContent>(Alias, Context); return(content == null ? null : new ImageContent { Name = content.Name, Url = content.GetImgixImage(), FocalPointX = content.GetCropDataSet().FocalPoint?.Left, FocalPointY = content.GetCropDataSet().FocalPoint?.Top, AlternativeText = content.GetPropertyValue <string>("alternativeText") }); }
public override object ProcessValue() { var content = _processorAttributeHelper.ResolveContent <IEnumerable <IPublishedContent> >(Alias, Context); return(content?.Select(i => i.GetProperty("productId")).Select(p => p.Value as string).ToList() ?? new List <string>()); }
public override object ProcessValue() { var content = _processorAttributeHelper.ResolveContent <IEnumerable <IPublishedContent> >(Alias, Context); return(content.FirstOrDefault()?.Children.As <CardTextSuggestionCategory>()); }
public override object ProcessValue() { var content = _processorAttributeHelper.ResolveContent <IEnumerable <IPublishedContent> >(Alias, Context); return(content.Select(c => c.GetProperty("cardText")).Select(p => p.Value as string).ToList()); }
public override object ProcessValue() { var content = _processorAttributeHelper.ResolveContent <IEnumerable <RelatedLink> >(Alias, Context); return(content?.FirstOrDefault().ToLink()); }
public override object ProcessValue() { var content = _processorAttributeHelper.ResolveContent <IEnumerable <IPublishedContent> >(Alias, Context); return(content?.Select(i => i.GetProperty("quantity")).Select(q => q.Value as int?).ToList() ?? new List <int?>()); }
public override object ProcessValue() { var content = _processorAttributeHelper.ResolveContent <string>(Alias, Context); return(content.ToLowerInvariant()); }