共享点功能,各个站点级别的自定义aspx页面 [英] Sharepoint features, custom aspx pages at various site levels

查看:90
本文介绍了共享点功能,各个站点级别的自定义aspx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在此处提出了类似的问题,但该怎么办?更具体些.

I've asked a similar sort of question here but what to be more specific.

我希望能够部署解决方案并激活一项功能,该功能可将各种自定义aspx页面设置到我网站中的不同网站级别.

I want to be able to deploy a solution and activate a feature that provisions various custom aspx pages to different site levels within my web site.

因此,我的第一个自定义aspx页面将位于根目录: http://example.org/custompage1.aspx

So my first custom aspx page would be at the root: http://example.org/custompage1.aspx

,然后另一个自定义aspx页面将显示在更深的级别: http://example.org/subsite1/custompage2.aspx

And then another custom aspx page would appear at a deeper level: http://example.org/subsite1/custompage2.aspx

我的解决方案范围仅限于网络"级别.如果我在子站点级别激活该功能,则可以访问应在此更深级别显示的自定义aspx页面,但是,我也可以访问仅应在网站根目录显示的其他页面,例如 http://example.org/subsite1/custompage1.aspx

I've got my solution scoped to the "web" level. If I activate the feature at the sub site level I can access the custom aspx page that should appear at this deeper level, but, I can also access the other page that should only appear at the root of the web site e.g. http://example.org/subsite1/custompage1.aspx

错,错,错!

我试图将功能范围限定为站点",但这似乎只是提供了根自定义aspx页面,而不是应在网站的更深层显示的页面.

I tried to scope the feature to "site" but this only seemed to provision the root custom aspx page, not the page that should appear at the deeper level of the web site.

推荐答案

您在功能xml中所做的任何操作仅适用于激活了该功能的网站.如果要基于相对URL在多个站点上执行某些操作,则需要设置功能接收器并使用自定义代码将文件/功能部署到其他站点.

Anything you do in the feature xml will only apply to the site on which the feature is activated. If you want to do something across multiple sites based on relative urls, you will need to set up a feature receiver and use custom code to deploy files/features to the other sites.

最简单的方法可能是在解决方案中创建单独的网络范围内的功能,并让站点范围内的功能接收者在子站点上将其激活.

The easiest approach is probably to create a seperate web scoped feature within your solution and have the site scoped feature receiver activate it on subsites.

这篇关于共享点功能,各个站点级别的自定义aspx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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