MOSS 在所有网站上都提供特定页面
我有一个 MOSS 发布网站,名称为 http://dev。它基本上是一个杂志网站,每个月有一期,所以它是 dev/2011-01、dev/2011-02,等等。
有一些常规页面,例如 About.aspx、ContactUs.aspx,应该可以解决所有问题。我不想在每个问题/站点中创建这些页面。我知道我们可以将页面放在 TEMPLATE\LAYOUTS 文件夹中。
但我不太喜欢它,因为我希望页面驻留在 dev/Pages 文件夹中,所以它位于 1 个存储库中,而不是到处。
还有其他方法可以实现这一目标吗?就像自定义处理程序一样,它将请求从 dev/2011-01/Pages/About.aspx 定向到 dev/Pages/About.aspx。
I have a MOSS Publishing Site, say it's http://dev. It's basically a magazine site, with an issue for every month, so it's dev/2011-01, dev/2011-02, and so on.
There are some general pages like About.aspx, ContactUs.aspx which should be available for all issues. I don't want to create these pages in every issue/site. I know we can put the page in TEMPLATE\LAYOUTS folder.
But I don't really like it, because I want the pages to reside in dev/Pages folder, so it's in 1 repository, instead of here and there.
Is there any other way to achieve this? Like a custom handler that will direct request from dev/2011-01/Pages/About.aspx to dev/Pages/About.aspx.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您始终可以编写一个 HttpHandler 来重定向这些页面的请求。
然而,最好的方法是将
Module
部署该功能 使用GhostableInLibrary=TRUE
的功能这样,您的页面将驻留在文件系统的功能文件夹中,但在所有站点上都将作为幻影文件可见。您可以通过升级功能来升级文件。
You can always write a
HttpHandler
which will redirect the request for these pages.However , the best way would be to
Module
Feature withGhostableInLibrary=TRUE
This way, your pages will reside on file system in feature folder, but will be visible on all sites as ghosted files. You can upgrade the feature to upgrade the files.
我不确定为什么你需要一个自定义处理程序。您要么利用导航(这意味着这些页面存在于每个子网站上),要么手动输入 URL。如果是后者,为什么不指向根站点上的 URL?
当我过去做过类似的事情时,我会创建一个自定义母版页,并将 URL 添加到左侧导航或页脚(或两者)的根站点中的页面。您应该能够使用以下样式的 URL:
~sitecollection/Pages/About.aspx
I'm not sure why you would need a custom handler. Either you are leveraging the navigation, which means these pages exist on every subsite, or you are manually entering the URL. If it is the latter, why not point to the URL on the root site?
When I've done something like this in the past, I create a custom master page and add the URLs to the pages in the root site in either the left nav or footer (or both). You should be able to use a URL in the style of:
~sitecollection/Pages/About.aspx