I have created a site definition, there are many ways to use features with this site definition,

You can create a site from this site definition and deploy feature on that newly created site, you can also include features in onet.xml of site definition file and then create site from it. Another way to do is by feature stapling which associate your feature to the site definition.

In this blog I will demonstrate how you can use feature stapling to associate your features with site definition.

To use the  stapling, you need features which you like to map with the site definition.

You need to create a second feature which does the stapling.  The solution sample is given below

The manifest.xml file if you are wrapping your feature in a solution. 

    <FeatureManifestLocation="EB.MyDemo.FeatureStapling\feature.xml" />

Note: The feature stapling will not affect any sites which have been already created from a site definition, only subsequent site will take the affect. But you can activate features individually on the site.


Comments are closed.

About Us

Follow Us

Email: contact@keapoint.com
Phone:  0208 7852 888

Registered Address: 1 Amber Close, Reading, RG6 7ED. United Kingdom

Company No. 11586817