Skip to content
Albert-Jan Schot
Albert-Jan Schot

· 1 min read

Post

MasterPage Stapling Feature

SharePoint 2007 has been around for a while and one of the things I recently stumbled up again made me creating my first CodePlex project. Whenever you create a custom masterpage, and use that on your site collection each created subsite that is not of the type publishing will use the default SharePoint style, and so ‘breaking’ your layout.

Now I know there are several solutions on the web that you can buy, or that you can simply ‘apply’ your custom masterpage manually. But I used some time making a feature that can be used to apply the masterpage used in the parent site on activation, and reset it to it’s default on deactivation. And in order to make it even easier I made another feature that staples the other feature to each site definition, so whenever you create a site the feature that applies the masterpage is automatically attached and activated.

The CodePlex project can be found on http://masterpagestapler.codeplex.com/ and contains both the 2 -wsp’s (in case you don’t care about the source, and just want to fix it), and it contains the source.

Albert-Jan Schot

Albert-Jan Schot

CTO, Microsoft MVP & FastTrack Recognized Solution Architect

I am Albert-Jan Schot, CTO at Blis Digital, Microsoft MVP, and FastTrack Recognized Solution Architect focused on Microsoft 365, Azure, and AI agents. I help teams turn complex Microsoft Cloud challenges into practical architecture decisions and shipped outcomes.

Copilot Studio Microsoft 365 Agent Flows

Zuid Holland, Netherlands

Related Posts