I save crop information on my images in the Sitecore library in the field that was added to the /sitecore/templates/System/Media/Unversioned/Image
.
I would like to access this field along with all the other properties that exist in a complex field like Glass.Mapper.Sc.Fields.Image
so that I can continue to use GlassHtml.RenderImage()
in my views.
My initial attempts to inherit from the class were unsuccessful - it seems to have violated the display behavior - so I wonder if there is another way to extend this class with additional properties?
Here is what I tried:
[SitecoreType(AutoMap = true)] public class MyImage : Glass.Mapper.Sc.Fields.Image { public virtual string CropInfo { get; set; } }
source share