R – SharePoint: Temporary switching PageLayout of PublishingPage in HttpModule fails

publishingsharepoint

Im working on an edit/display mode switch of MasterPage and PageLayout. I asked a question on this before (How to dynamically switch PageLayout and MasterPage of SharePoint Publishing page?). The nicest approach seems to be a HttpModule where to switch MasterPage and PageLayout to edit specific variants.
MasterPage switching is no problem, but the PageLayout switching results in an error.

Best Answer

I found the definitive answer! Its all working now! Problem was that after publish the wrong item is cached. I flushed the item from the cache and it all works now. Also did a lot of rewriting on the code. I am now creating a WSP package for it with an activation feature, preparing the code for publication on codeplex. I will update this post as soon as the code is published.

Related Topic