0

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.

4

1 回答 1

4

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;}
于 2014-09-18T04:13:20.700 回答