Just thought of sharing the list of Sitecore item default field name (see the imagess below). I believe you can find the listing in a page or pdf somewhere in SDN, but it could be hard to find.
Anyway, if for example you would like to retrieve an item "created by" value
You can do so by
Var createdBy = Sitecore.Context.Item[“__created by”];
Or
Var createdBy = Sitecore.Context.Item[Sitecore.Data.Fields.FieldIDs.CreatedBy];
The later approach by using Sitecore.Data.Fields.FieldIDs.
No comments:
Post a Comment