Caching when you have duplicate container components

In theory, the magic of Dynamic Placeholders lets us have a container component placed onto your page more than once. That didn’t work in the old world of “static” placeholders, because the rendering engine didn’t like two placeholders with the same name. But despite it’s benefits, the dynamic implementation has an annoying edge case – you may not be able to enable caching for your container component. I had a client bump into this issue recently, so I spent some time considering approaches that might help them address this issue. Continue reading

Getting MVC components to communicate

Every so often, the move from WebForms style projects to MVC ones throws up a challenging question. An issue which I came across recently, is how do you cope with a situation where two independent components on a page need to exchange data? In WebForms projects there we could connect them together via the Layout’s Code Behind, and in front-end situations JavaScript can do a similar job for us. But the situation requires back-end code and we’re using MVC it’s a bit more of a challenge… Continue reading

Editing layout details

I came across a Stack Overflow question recently, from someone who was interested in programatically changing settings in the Layout Details of Sitecore pages. While I knew a bit of the answer at the time (that I’d worked out while prototyping Sitemap generation code), the idea interested me enough to do a bit more research into the topic, and try to work out the details.

So here’s some notes on the hows and whys of using code to change layout details. (I’m working on Sitecore 6.6 here, but this information is relevant to many versions of Sitecore) Continue reading