views:

426

answers:

2

Im working on an edit/display mode switch of MasterPage and PageLayout. I asked a question on this before (http://stackoverflow.com/questions/981685/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.

A: 

I found the solution. I have to update the list item, otherwise the url exeception occures. It isn't like the temporary updating the master url in the web, I have to update the list item. Doesn't really matter, there is a good SystemUpdate(false) variant that makes no versions. I did huge rewrites, but still did not get it completely working again. Sometimes the edit mode still uses the display pagelayout, and I just can't find out why. Does anyone dare to helpme debugging this. If it works we have something interesting I think. Full seperation of Edit and Display masterpages and pagelayouts. The strange thing is that the used pagelayout is lagging behind. I get sometimes a display pagelayout in edit mode, and an edit pagelayout in display mode.

Serge van den Oever
A: 

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.

Serge van den Oever