Sitecore Site Definition Attributes

Sitecore Site Definition Attributes

Sitecore Site Definition or sitedefinition.confg file is a patch config file which by default disable in vanila instance of sitecore because generally web.config file have all the site definition settings in it. But if there any requirement of site definition customization it always recommended to enable this patch config file. For multi-site configuration we update the site definition config file. There are lots of blog on multisite configuration in Sitecore. I have created a list of site definition attribute list, there are lots of attributes for site definition in sitecore, you can find the list in web.config file as well just above the <sites> node in it.

Site Attributes  Uses
mode [on|off]. If set to ‘off’, the site will be disabled. Default value: ‘on’.
name Name of the site
hostName The host name of the incoming url. May include wildcards (ex. http://www.site.net, *.site.net, *.net, pda.*, print.*.net)  It’s possible to set more than one mask by using ‘|’ symbol as a separator (ex. pda.*|print.*.net)
targetHostName The host name to use when generating URLs to items within this site from the context of another site. If the targetHostName attribute is absent, Sitecore uses the value of the hostName attribute instead.Used only when the value of the Rendering.SiteResolving setting is true.
port The port number of the incoming url. Default value: 80
virtualFolder The prefix to match for incoming URL’s.  This value will be removed from the URL and the remainder will be treated as the item path.
physicalFolder The physical location of files for the site. If the site is based on physical files, this is the path to the folder holding the files. For non-physical sites, this is the place where Sitecore looks for a default.aspx file (to start the pipelines).
rootPath The path to the root item of the site.The item path specified in the URL will be appended to this value to find the item.
startItem The path to the start item of the site. This is used as the default item path if no path is specified in the URL. It will be combined with rootPath to find the default item of the site.
language Default content language for the site
database Database containing items to be used for rendering the site. Default context database for the site
content Default content database for the site (the database to edit within CMS user interfaces)
contentLanguage Default content language for the site (the language to edit within CMS user interfaces)
contentStartItem Path to default home item for CMS users relative to the value of the rootPath attribute (/home)
masterDatabase Name of database to set as context database in Preview and Web Edit modes
device The name of the device to use for the site. If not specified, the device resolver will find a ‘best match device’.
filterItems If true, the site will always show the current version of an item (without publishing) | Live  mode configurations
filteredItemsCacheSize The size of the cache used to store filtered items according to the filterItems attribute. Specify the value in bytes or append the value with KB, MB or GB
cacheHtml If true, HTML caching will be enabled. If false, no HTML will be cached for any rendering. Default value: false.
htmlCacheSize The maximum size of the html cache. Specify the value in bytes or append the value with KB, MB or GB
cacheMedia If true, media caching will be enabled. If false, no media will be cached. Default value: true.
mediaCachePath The path to the folder where media data will be cached. Default value: {temp folder}/{site name}/mediacache
cacheRenderingParameters Specifies whether the RenderingItem Parameters cache should be enabled. If false, caching is disabled and the value of the Parameters property of the RenderingItem object is recalculated every time it is accessed. To improve the performance of page rendering on content delivery servers, you should enable caching of the Parameters value. Sitecore  recommend that you disable RenderingItem Parameters caching on content management servers.  Default value: false
renderingParametersCacheSize The size of the RenderingItem Parameters cache. Specify the value in bytes or append the value with KB, MB or GB.
domain The security domain of the site
requireLogin If true, login will be required to enter the site.
loginPage The path to the login page to use. Must point to a physical file or a page in a site that does NOT require login.
enableDebugger Enable or disable Sitecore debugging features, including tracing, profiling, and rendering information, and the debugging ribbon
enablePreview Indicates if preview is enabled on the site.
enableWebEdit Enable or disable the Experrience Editor(Page Editor) for the site WebEdit is a legacy name for what is now the Experrience Editor
enableWorkflow Must be true to enable workflows for the site (for live mode configurations)
enableAnalytics Indicates if analytics is enabled on the site. Default value: true
allowDebug Controls whether presentation components that inherit from Sitecore.Web.UI.WebControl collect profile and trace information, affecting whether the debugger renders information about those controls, and whether to show tracing and profiling commands in the debugger ribbon
browserTitle Value for HTML <title> element for pages on this site (used by the site that hosts the CMS user interfaces)
disableBrowserCaching If set to true, browser caching is disabled for the site. If set to false, browser caching is enabled for the site. If absent, the value of the DisableBrowserCaching setting in the <settings> section determines browser caching for the site.
disableClientData Enable or disable storage required for CMS user interfaces for the site
disableXmlControls Enable or disable Sitecore user interface technology for the site
defaultDevice The device to use if no specific device matches the request. This setting takes precedence over the default device as it is set by Default checkbox for Device item.
dictionaryDomain The default domain to use when looking up dictionary phrases for the website. If a phrase does not exist in this dictionary domain, Sitecore attempts to locate that phrase in the default dictionary domain – /sitecore/system/Dictionary in the current database. If the phrase cannot be found in the default dictionary domain, Sitecore attempts to locate that phrase in the default dictionary domain in the Core database, if that database exists.  You can override the site-specific dictionary domain by passing parameters to the Translate.Text() method.  inherits: Indicates that the attributes should be inherited from another site. To enable inheritance, you must specify the name of the source site. Attributes that are explicitly specified overwrite the attributes that are inherited from the source site.
analyticsDefinitions The database where the Analytics definition items for this site are stored. To use the content database for the site, specify “content”.  If this attribute is not specified, the current context database is used. If the context database is not set, for example, for code that runs in a background job, the value of the DefaultDefinitionDatabase setting in the Sitecore.Analytics.config file is used.
Advertisements