Custom Sitecore Configuration: Part 2, Objects

This post follows on from my introductory post about Sitecore configuration, where I talked about using settings and retrieving XML fragments.  In this post I talk about how you can use Sitecore configuration to instantiate and populate objects of your choosing.  This is useful for cutting down on the amount of mapping code you have to write, without needing to put attributes all over the place.

Continue reading Custom Sitecore Configuration: Part 2, Objects

Custom Sitecore Configuration: Part 1, Introduction

I’ve spent quite a bit of time looking into the way that Sitecore configuration can be used.  It has some fairly novel features in it, and while it’s becoming less relevant as support for dependency injection in Sitecore matures, I don’t think it’s going anywhere.  All the same, it’s quite useful for adding flexibility to your Sitecore customisations, or for piggybacking on to provide custom configuration for your own modules and sites. Continue reading Custom Sitecore Configuration: Part 1, Introduction

Inheriting website attributes and trimming your Sitecore configuration

Today I had the dubious pleasure of seeing a Sitecore solution containing several hundred microsites.  I spent a little while silently fuming at the developers for not using the inherits attribute, until it occurred to me that this attribute isn’t really documented anywhere.  I’m not going to attempt to do so fully; I’ll leave that job (along with the many other undocumented attributes) to the Sitecore documentation team.  I will provide a bit of detail on it, though, along with another option that would be a good alternative to the mass of duplicated configuration that I saw. Continue reading Inheriting website attributes and trimming your Sitecore configuration

Sitecore Patch Files

As anyone familiar with Sitecore’s guide of recommended practices, changing the <sitecore> section of the Web.config file directly is frowned upon.  Rather, developers should use things called Sitecore configuration include files, or patch files.  By default, these are stored in the /App_Config/Includes folder of the website.

There are plenty of blog articles about them on the internet, however there was one specific feature that seems to be relatively unknown: the set namespace. Continue reading Sitecore Patch Files