Site definition in SXA

SXA, a buzz word in Sitecore, is a rapid way to build your sites with Sitecore. It is a tool that provides you predefined and standard ways to produce your site. Creating Tenants and Websites is just a act of few clicks. But if you compare with traditional way of creating sites in Sitecore, ever wondered, where does it maintain Site Definition?

Traditionally, we created a site definition configuration when adding a new site, like this –

 <site
        
name=”website”
        virtualFolder
=”/”
        physicalFolder
=”/”
        rootPath
=”/sitecore/content”
        startItem
=”/home”
        language
=”en”
        database
=”web”
        domain
=”extranet”
        allowDebug
=”true”
        cacheHtml
=”true”
        htmlCacheSize
=”10MB”
        enablePreview
=”true”
        enableDebugger
=”true” />

But with SXA, you do not need to care about it anymore. SXA creates site definition in a content tree at path. Now, if you compare all attributes from above configuration patch with this item field, you will realize its all same. Bingo!

This is a path to definition item,

/sitecore/content/~Tenant~/../~Site~/Settings/Site Grouping/~Site Name~

site definition fields

Now what if you wish to add a dictionary root in your site. Yeah, you guessed it right !!! Just add a DictionaryRoot attribute along with its value here and you are good to go.

dictionaryroot

You may add all such properties from site definition to modify your site definition.

Happy coding..