Access the Standard Value of a field

Abstract

How to access the Standard Value of a field using the Sitecore.Data.Fields.Field.GetStandardValue() method.

You can use the Sitecore.Data.Fields.Field.GetStandardValue() method to access the standard value of a field. For example, to access the standard value of the Title field in the /Sitecore/Content/Home item in the Master database:

Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master");

Sitecore.Data.Items.Item home = master.GetItem("/sitecore/content/home");

Sitecore.Data.Fields.Field titleField = home.Fields["title"];

string standardTitle = titleField.GetStandardValue();