In this post we will discuss about What is Feature Stapling in SharePoint 2010? How we can use Feature Stapling in SharePoint 2010?
Also you can check out some of my posts like:
Feature Stapling is a very useful thing in SharePoint 2010. It is very useful if the site definition is already in use and some sites has been already created.
For example, suppose you want to a custom list to be created whenever you will create a site from Team site template. Or Suppose you want to a custom theme to all your sites then you can do all these by using Feature Stapling.
Feature Stapling has two features. A "Stapler" feature which staples another feature to the site definition and the "Staplee" feature which will be stapled.
So here, we need to create a feature and then we need to create a feature stapler and then we need to create a feature association xml file.
This feature association file will help us to associate the feature to the site definition.
Then we can deploy the whole solution.
Here one important point to remember is: Feature-stapling won't affect any sites which have already been created from a site definition, only subsequent sites. The only way to do this is to activate your features individually on the site.