如何在特定的单个网站中部署sharepoint 2010功能。 [英] How to deploy the sharepoint 2010 feature in specific single website.

查看:138
本文介绍了如何在特定的单个网站中部署sharepoint 2010功能。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以编程方式在特定单个网站(而非网站集)中部署sharepoint 2010功能,其功能范围是Web?在谷歌搜索的任何地方,它引用像SPSite site = SPContext.Current.Web.Site;使用此功能部署在网站集中的所有Web中

How to deploy the sharepoint 2010 feature in specific single website(not in site collection) programatically whose feature Scope is "Web"? While doing the google search everywhere its refering something like SPSite site = SPContext.Current.Web.Site; Using this feature is deploying in all web in the site collection

推荐答案

SharePoint功能将全局部署,但默认情况下不会在所有站点上激活。



如果您只想在一个站点上激活该功能。隐藏功能并通过代码或电源shell激活功能。





隐藏功能更新功能元素的隐藏属性为'TRUE',如下所示:



< feature>

Id =AD2146D-62DA-4911-DBC1-AE177DE40084

Title =受限制的Web部件

隐藏=TRUE

... />
SharePoint features will be deployed globally but not activated by default on all sites.

If you want activate the feature on only one site. Make the feature hidden and activate the feature through code or power shell.


To hide a feature update the Hidden attribute of the Feature element to ‘TRUE’ as shown below:

<feature>
Id="AD2146D-62DA-4911-DBC1-AE177DE40084"
Title="Restricted Web Parts"
Hidden="TRUE"
.../>


这篇关于如何在特定的单个网站中部署sharepoint 2010功能。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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