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.
2 thoughts on “Feature Stapling for Branding”
Be interesting to get your opinions on this wiki page as I’m trying to get an overall feel for pros and cons of each approach to branding.
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’