0

I have created and saved a Team Site template. When a user creates a new site using this template, I want to ensure the Parent's Master Page is inherited automatically. This is not currently happening even though I saved the template with the publishing feature enabled and the master page set.

What is the best route for activating the feature and setting the MP? If it includes an event receiver, pls show me how to create and attach to the template.

1

Write a web provisioned event receiver and set the child site master page to parent site's. This way you need not activate Publishing feature on team site

In Visual studio: Create Event receiver. Choose event to be "Web was provisioned"

1
  • yes, this is what ended up doing.. Very simple public override void WebProvisioned(SPWebEventProperties properties) { SPWeb web = properties.Web; web.CustomMasterUrl = "/_catalogs/masterpage/custom.master"; web.Update(); base.WebProvisioned(properties); } Jun 26 '14 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.