Sharing groups of components between pages: the Keystone Content Block.

When working with component driven designs in Sitecore (and let's be frank, if you are not, you are doing it wrong) there is often a need to share groups of components and their settings: datasource, personalization, etc. Sitecore provides no native mechanism to do this which is why we created the content block.

The concept is simple: a content block component that is added to the page is assigned a datasource. Instead of showing the contents of the datasource, the content block reads the presetntation details of datasource and inserts those components on the page.

The key to making all of this work is the insertRenderings pipeline. There are some differences between MVC and WebForms, but all of the concepts are applicable. Instead of implementing logic in the content block component, a custom pipeline recognizes that there is a content block on the page.

To get you started, one possible structure of that pipeline in MVC is below. You will see that in this example the code relies on the convention that all components on the contnet block datasource are assumed to be in a placeholder "cbdesigner".