Feature Stapling for Branding

As I’ve mentioned before, I reckon that from now on I’ll do all SharePoint branding through features alone – not using themes or the ‘choose master page’ page. Which is fine, and useful too – one of the questions that has been raised recently is how to automatically apply the branding when a new site is provided. Well, feature stapling is the way to do that.

For those who don’t know, feature stapling is creating a feature which associates another feature with a Site Definition. When a site is provided by that site template the associated feature is activated. So, for example, we might have a BrandingFeature feature, which does all of our setting alternate CSS, setting master pages, etc., and then use a BrandingStapler feature to associate that with some (or all) of our site definitions.

I won’t bother repeating the ‘how to’ of it, as there are plenty of good posts about it.

Feature Stapling for Branding

2 thoughts on “Feature Stapling for Branding

  1. Erm, well, the page is interesting, but that page is relevant to a bit more than just branding. Although having a site definition to base your branding off, and then using features to deploy the branding resources is certainly a good way to go.

    It is something that a lot of folks don’t pick up on – that branding can include custom Publishing Page types, Page Layouts, and other content types.

    But I suspect that what I’ve been blogging about is slightly less ‘architecture’ and more ‘designy’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.