1

in our company we have SharePoint 2010 solution, which contains many Features for customizing standard SP Ribbon. The main reason why: we need specific functionality for other lists. So we are creating unique tab using FluentRibbon library.

And everything is working fine: features are deploying and activating without any errors. All functionality in ribbon works well. But one of our customers has many SP Web Applications, each of them contains several Site Collections. So when the customer goes to any sites to Site Actions -> Site Settings -> Manage site features, he complains about the feature visibility as he can see all our features.

For sure all of them are disabled, but the fact is that all these features have no relation to other sites except the target one. How to hide them from others sites?

I know FluentRibbon provides other options to deploy custom ribbon such as ContextualWebPart, RibbonLayoutsPage and RibbonControl. But all of them uses some external items (application pages, controls and web parts). In our case we want to customize existing external lists.

1

You cannot hide features after they have been deployed.

Correction: Web Application is not a border for feature definition visibility in SharePoint 2010 SP2 as reflecting on Microsoft.SharePoint.WebControls.FeatureActivator shows.

Actually, what you should have done is you should have deployed to the one and only web application that is supposed to utilize the features.

If that's an option - try retracting your solution from all other web applications.

The Web Application is the granularity scope of where the feature activation will be visible to the site owners. All site collections within one web application will have the same set of features available.

  • Solution was deployed for a specific web application and not globally. The problem is that all those features are visible from other web applications. If there is no way to change it, I need more details why does it happen to explain our client. – WISEMAN Dec 25 '13 at 20:49
  • Microsoft.SharePoint.WebControls.FeatureActivator.AddFeaturesToTable(ref DataTable) iterates over SPFarm.Local.FeatureDefinitions and SPContext.Current.Site.FeatureDefinitions not to mention the SiteSubscription FeaturePack collection. Therefore, deploying to separate web application will not affect the visibility of features in the _layouts/ManageFeatures.aspx page. I think this could be submitted as a feature request to the product team for a future service pack or product version. – Alexey Krasheninnikov Jan 12 '14 at 8:38
0

Custom features can be created by having Hidden attribute set to True. Powershell script will then activate the features in required web application only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.