Question

I have a SP 2010 Enterprise/VS 2010 workstation. I have built and deployed a custom master/CSS/asset library for a standard My Site deployment as a feature and modules. The master deploys and functions correctly - it's a bit clunky to have to manually activate the feature each time, but w/e. I can deal with that. The master page feature is scoped at "Site" level.

Because I am also attempting to theme the My Content portion of the My Site portal - which is provisioned after the master page feature activation, I have attempted to use Feature Stapling to force newly provisioned My Content sites to follow the custom master in the according feature. However, this is not occurring. Further, the My Content site does not include the two features I have built in the feature list from /_layouts/ManageFeatures.aspx?Scope=Site. The parent My Site site does.

The Main.Feature Feature Id property matches the Id in the (entirely included) manifest file for the stapling feature below:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <FeatureSiteTemplateAssociation Id="f75480c9-8875-4f12-8358-f8f4441342bd" TemplateName="GLOBAL" /> </Elements>

What is causing the features to fail to inherit? If this is not causing the feature to be activated by the stapling, what is causing the stapling feature to fail to appropriately associate the new master page for the newly provisioned site/where should one look for the appropriate settings to allow this to happen?

Was it helpful?

Solution

If you're trying to associate your feature to the MySite, try this, substituting the GUID of the feature you want activated for the Id. This associates the specified feature to the SPSPERS#0 template (MySite).

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <FeatureSiteTemplateAssociation
   Id="f3fce6c7-751d-4009-87df-75564ab6fe4f"
   TemplateName="SPSPERS#0"/>
</Elements>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top