views:

431

answers:

2

I have a branding feature that works great and staples to everything but custom site templates (as noted at the bottom comment on this MSDN article it's not possible to staple to custom templates out of the box).

stapling.xml

staple all site defitions to BrandingChildSiteInitializer
      <FeatureSiteTemplateAssociation
        Id="1204A425-D105-46c5-BB2C-473A2F27B563"
        TemplateName="GLOBAL" />

staple blank site template to BrandingChildSiteInitializer
      <FeatureSiteTemplateAssociation
        Id="1204A425-D105-46c5-BB2C-473A2F27B563"
        TemplateName="STS#0" />

In summary, this does not get stapled to custom sites that one creates and adds to site template gallery. So, when a user creates a new site based off a custom template the branding doesn't get applied. How would I get this feature stapled to every site?

I was thinking of something on my feature or other features in my solution that can add custom templates to the global list? Im not sure where to start regardless.

My .wsp is purely a bunch of custom C#, ASP, HTTPHandler etc that attaches a new masterpage and changes the theme. The feature in question simply tells the newly created site to use the properties of the parent (custom masterpage, theme etc)

A: 

Hi there.

Have look at this post, it mentions stapling to all sites via the GLOBAL name. There might be something different that this guy has done to create the stapling declarations working compared to your files?

Cheers. Jas.

Jason Evans
That does not work for "Custom Site Templates" that get created, as I elaborated on in my question.
Marc
A: 

If you've turned on publishing at the top level; you can force all child sites to use the parent masterpage.

jagprinderdeep
The masterpage isn't the issue here. Themes cannot be inherited, therefore a branding feature is needed to set the theme of a site when it gets created.
Marc
Completely wrong, but okay
jagprinderdeep