Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have read on several blog posts (Vesa,Mirjam) that custom web templates (CWT) does not support feature stapling (MSDN doesnt mention this tho, but I take their word on it).

What I am wondering is, what about all the OOB feature staplers (FeatureSiteTemplateAssociation)? It seems that they are activated in a web template just fine. For example AssetLibrary that is a site (SiteCollection) scoped feature. This feature is only activated through feature stapling on a farm scoped feature.

Checking this feature on my CWT site reveals that it is activated during provisioning:

PS>get-spfeature -Identity assetlibrary | Format-List DisplayName, Status
DisplayName : AssetLibrary
Status      : Online

An article on MSDN specifies that:

Unless indicated otherwise, excerpts used in the following examples are taken from the Onet.xml file for the STS site definition

This does not seem to be true for modules, doctemplates etc, and also goes directly against what Vesa specifies in the FAQ part of his article. I am speculating though, if what is ment on MSDN is, that feature stapling still is triggered based on the base template.

Can anyone share their thoughts on this? Despite being hyped as the new black, CWT unfortulately is lacking good documentation on MSDN. :-/

share|improve this question
    
Just voted to delete my "answer" post, having looked back at some older code where I thought I was using stapling I was just referencing features. The problem when you're working on 4 different projects at once ;) –  Tim Ebenezer May 9 '11 at 14:31
add comment

1 Answer

up vote 3 down vote accepted

The BaseTemplate site definition isn't used while creating a site based on a web template. It is there as a reference for after site creation (it needs one in the database and it needs one in case of a future upgrade). Stapling features to a site definition that is used as a base for a web template won't activate them. You would have to dig a little bit deeper to see where the AssetLibrary got activated.. It might be referenced in another feature.

share|improve this answer
    
I did dig :) assetlib feature isnt associated anywhere but in stapling... –  Anders Rask May 8 '11 at 10:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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