I would like to access the Sitecore built in "__Renderings" field as a property of a Glass model. What type can I use to do this ?
Thanks.
I would like to access the Sitecore built in "__Renderings" field as a property of a Glass model. What type can I use to do this ?
Thanks.
To get the renderings field you should do something like this:
[SitecoreField(FieldName="__Renderings")]
public virtual string Renderings {get;set;}
If you want to handle the object as something else you will need to implement a custom data handler. You can find the tutorial on how to do this here. After that you will just need to set the datatype of the field to something like:
[SitecoreField(FieldName="__Renderings")]
public virtual IEnumerable<Rendering> Renderings {get;set;}