Monday, December 6, 2010

Stapler feature GLOBAL#0 doesn't staple

When adding feature staplers, you can add individual site templates to activate the feature staplee like so:


<FeatureSiteTemplateAssociation Id="c9a041c2-f258-4290-bfa9-96c854a12b24" TemplateName="SPSNEWS#0"/>

where the ID is the Staplee feature ID, and the TemplateName is the [WebTemplate Name]#[Web Template ID].

But when trying to associate ALL site templates, you've got to drop the #[Web Template ID] to get it to work, like this:

<FeatureSiteTemplateAssociation Id="c9a041c2-f258-4290-bfa9-96c854a12b24" TemplateName="GLOBAL"/>
 

No comments: