public Paragraph Create(IFieldSet fs) { return new Paragraph { BodyText = fs.Field("BodyText", fld => richTextHelper.ResolveRichText(fld.Value)) ?? string.Empty, SubTitle = fs.Field("SubTitle"), }; }
public Paragraph Create(IFieldSet fs) { return(new Paragraph { BodyText = fs.Field("BodyText", fld => richTextHelper.ResolveRichText(fld.Value)) ?? string.Empty, SubTitle = fs.Field("SubTitle"), }); }
public T BuildSingleLink <T>(IFieldSet fields, T instance) where T : SingleLink { BuildLinkText(fields, instance); instance.HeadingTitle = fields.Field("Heading") ?? ""; instance.Image = fields.Image(); string linkTitle = FindInHierarchy(fields, "LinkTitle"); instance.Title = linkTitle ?? fields.Field("Heading"); return(instance); }
public static string Image(this IFieldSet fields, string name = "Image") { return(fields.Field(name, fld => fld.LinkedComponentValues .Select(c => c.Multimedia.Url) .FirstOrDefault() )); }
public static string Field(this IFieldSet fields, string name) { return(fields.Field(name, fld => fld.Value)); }
public T BuildLinkText <T>(IFieldSet fields, T instance) where T : Link { instance.Title = fields.Field("LinkTitle"); return(BuildLink(fields, instance)); }