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