Access system data templates

Version: 10.4

You can use the Sitecore.TemplateID class to access system data templates. For example, to access the standard template in the Master database:

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

Sitecore.Data.Items.TemplateItem standard =

master.Templates[Sitecore.TemplateIDs.StandardTemplate];

Do you have some feedback for us?

If you have suggestions for improving this article,