I've seen the term "feature stapling" used around this site and some blogs. What exactly does this mean? My best guess is that it has something to do with dynamically activating features from other features.
Feature stapling is a tecnique that allows for a feature to be stapled to a site definition by using a support "stapler" feature that defines which features are attacched to which site definition.
This allows for a feature to be automatically activated on a site created from a site definition without the need to modify the definition files (onet.xml). This also means that:
Anyway, you must remember that stapling does not affect sites that have already been created: the stapled feature will be activated only on new site, so you will need to manually activate the feature on any old site you may have.
To create a feature stapling infrastructure you will need at last two feature: the feature that needs to be stapled (ie: the feature you want to be automatically activated) and a feature that performs the stapling associaton. Es-Take the following element.xml file taken from a sample stapler feature:
As you see to define the stapling accociaton, the tag "FeatureSiteTemplateAssociation" is used. You will need to specify the ID of the feature that should be stapled, followed by the name of the site definiton the feature will be attacched to. Just remember that the site definition name should be in the # format.
Also, have a look to this msdn page that explains some further details (taken from the 2007 docs, but it's still valid for 2010).