Return to doc.sitecore.com

  Settings and Configuration
Prev Next

Sitecore.Settings from Sitecore V4 became Sitecore.Configuration.Settings in Sitecore V5, supporting most of the old functionality. It exposes a large number of predefined web.config settings and allows to read custom ones.  

Use Sitecore.Configuration.Factory class to get Sitecore configuration data.   

To get specific database or domain:  

Database web = Sitecore.Configuration.Factory.GetDatabase(“web”);

Domain extranet = Sitecore.Configuration.Factory.GetDomain(“extranet”);  

Make sure that you don’t use factory to retrieve the current facilities – always use Sitecore.Context to get the current database, current database and so on.  

Supplementary reading:

Sitecore V4

Sitecore V5

Sitecore.Settings

Sitecore.Configuration.Settings

 

Sitecore.Configuration.Factory


Prev Next