Don't repeat yourself with Sitecore Branch Templates
Wikipedia defines Don't Repeat Yourself (DRY) as a principle aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy. Easy right? In fact, so easy that most developers apply the principle almost naturally and, in most cases, without even noticing they are using it.
Have you ever considered how Sitecore uses it? Oh yes, Sitecore does use it and extensively.
Don't believe me, keep reading...
Customize a rendering instance using parameter templates and the mvc.renderRendering pipeline
I've always been amazed by how configurable and extensible Sitecore is. Every time I think I'm taming the beast, Sitecore just looks at me, smiles and reminds me I know nothing... In other words, Sitecore keeps me humble...
This week I learned it is possible to have a more granular control over a rendering
inside the presentation layer using a combination of parameter templates
and
the mvc.renderRendering
pipeline. In my case I was looking for a way to invalidate
the rendering's cache, but I only wanted to do it for specific pages while keeping
the others intact. Thankfully, this combination was just what I needed.