Skip to content

Instantly share code, notes, and snippets.

@jonihietala

jonihietala/SitePageData.cs Secret

Last active Oct 22, 2017
Embed
What would you like to do?
public abstract class SitePageData : PageData, ICustomCssInContentArea, ICarouselContent
{
// ...
[Display(GroupName = "CarouselContent", Order = 10)]
[CultureSpecific]
[UIHint(UIHint.Image)]
public virtual Url Image { get; set; }
[Display(GroupName = "CarouselContent", Order = 20)]
[CultureSpecific]
public virtual string ImageDescription
{
get
{
var propertyValue = this["ImageDescription"] as string;
return string.IsNullOrWhiteSpace(propertyValue) ? Heading : propertyValue;
}
set { this["ImageDescription"] = value; }
}
[Display(GroupName = "CarouselContent", Order = 30)]
[CultureSpecific]
public virtual string Heading { get; set; }
[Display(GroupName = "CarouselContent", Order = 40)]
[CultureSpecific]
[UIHint(UIHint.Textarea)]
public virtual string SubHeading { get; set; }
[Display(GroupName = "CarouselContent", Order = 50)]
[CultureSpecific]
public virtual string ButtonText { get; set; }
[Display(GroupName = "CarouselContent", Order = 60)]
[CultureSpecific]
public virtual Url ButtonLink { get; set; }
[Ignore]
public bool Selected { get; set; }
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.