Access the Standard Value of a field

Version: 10.4

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:

RequestResponse
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();

Do you have some feedback for us?

If you have suggestions for improving this article,