SharePoint:在 HttpModule 中临时切换 PublishingPage 的 PageLayout 失败 [英] SharePoint: Temporary switching PageLayout of PublishingPage in HttpModule fails

查看:38
本文介绍了SharePoint:在 HttpModule 中临时切换 PublishingPage 的 PageLayout 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究 MasterPage 和 PageLayout 的编辑/显示模式切换.我之前问过一个问题(How to动态切换 SharePoint 发布页面的 PageLayout 和 MasterPage?).最好的方法似乎是使用 HttpModule 来切换 MasterPage 和 PageLayout 以编辑特定变体.MasterPage切换没问题,但是PageLayout切换导致报错.

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.

推荐答案

我找到了明确的答案!现在一切正常!问题是发布后缓存了错误的项目.我从缓存中刷新了该项目,现在一切正常.对代码也做了大量的重写.我现在正在为它创建一个具有激活功能的 WSP 包,准备在 codeplex 上发布的代码.代码一发布我就会更新这篇文章.

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.

这篇关于SharePoint:在 HttpModule 中临时切换 PublishingPage 的 PageLayout 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆