Feature Stapling in Sharepoint: Meeting Workspaces
// February 10th, 2009 // Sharepoint
I see feature stapling as an extension to the standard features, which allow you to make modifications or add functionality to a site after it has been created. It is the best way to extend Sharepoint functionality and is the supported way to make changes to any existing sites.
Recently i came up with a problem of how I would Change the masterpage of a particular Workspace (actually a meeting workspace attached to an events list). Chris Johnson’s Feature Stapling Article helped me to do just this. As he explains, you can make modifications to any site using a feature and simply stapling it to a site. Heres how i did it!
- First create a new WSPBuilder Project in Visual Studio
-
Create folder structure as detailed below:
-
Open your class file, mine is BardEventsWorkspace.cs, it should be similar to this below. Don’t forget to use Microsoft.SharePoint.Navigation;
-
Open BardEventWorkspace folder and open the feature.xml. It should look similar to the following:
-
Open the BardEventsWorkspaceStapler folder and open the elements.xml. It should look similar to the following:
Each one of the “FeatureSiteTemplateAssociation” nodes represents the site which I want to staple the original feature to. In this case it’s all the meeting workspaces. Also the Id should be the same as the feature. In this case “2B3451F0-BC93-41A4-9FAD-3A81861D651A”. See step 4.
-
Open the BardEventsWorkspaceStapler folder and open the feature.xml. It should look similar to the following:
-
On your solution, right click your solution and click “WSPBuilder” then “Build WSP” as shown below:
-
Using the Sharepoint Installer Project, add your WSP to the folder and change the setup.exe.config such that it is similar to the screenshot below:
- Deploy!
















Great article! I’ve followed your instructions for the feature stapling to replace the meeting workspaces masterpage and it seems to be running, but I always get a message that the master page setting is invalid. Are you using a special kind of master page designed for meeting workspaces, or should it also be possible with a master page that has been used for the rest of the site collection?
Thanks a lot!