Skip to content
August 22, 2016 / kiranpatils

Inheriting Sitecore Site Properties with Sitecore Patching and Transformation


Sitecore is such a huge platform that every day you find something new and interesting. Happens with you as well? It is happening with me since last 7+ years! 😉 But I am enjoying learning it and then sharing it with you.

So, let’s say you have one site node defined with all basic things e.g. enablePreview, enableWebEdit, hostName, startItem, database etc. It has hostName as “”. Now you would like to have one more site where you would like to use base attributes as earlier defined and you would like to modify few attributes only:

  <site name="site1" virtualFolder="/sitecore/admin" physicalFolder="/sitecore/admin" enableAnalytics="false" domain="sitecore" loginPage="/sitecore/admin/login.aspx"/>

  <site name="site2" inherits="site1" />
  <site name="site3" inherits="site1" domain="extranet" />
  <site name="site4" inherits="site1" enableAnalytics="true" />

Source :

I also did the same and it worked in local. But when I deployed it on QA/Dev server. It was not working. After spending sometime learnt something which I would like to share with you as well. You might see it in future or might be already facing it and reading this blog to find a way! 🙂 Let’s go!


As you would have done, I also did showconfig.aspx on server and then noticed that my site2 was getting added before site1 and that was causing this issue and it was happening because I was using SlowCheetah Transformation and inserting site2 based on environment. To fix it — I used patch:after=”site[@name=’site1′]” which fixed this issue. Here is how it looks new with transformation

  <site name="site2" inherits="site1" patch:after="site[@name='site1']" xdt:Transform="Insert" hostName="" domain="extranet" enableAnalytics="true"/>
  <site name="site3" inherits="site1" domain="extranet" /> 

Good read :

Happy Patching! 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: