0

I have been given the task of deploying some changes made directly to the Seattle master page in the root site of our Intranet site collection.

My question is what is the correct way of applying this to all existing and new sub-sites and also across three site collections? I also need to make sure it doesn't change the my-sites / search pages as I believe they use difference master pages altogether.

I have done something similar with a public SharePoint portal but that was in SP 2010 and I was using Publishing Sites, which we are not in this case so I can't seem to just say inherit master-page from the parent.

Any pointer in the right direction would be great as I Want to make sure I'm doing this in the right way.

  • 1
    The correct way definitely does not start with directly editing the seattle.master instead of making a copy and then edit the copy – Robert Lindgren Jan 23 '14 at 17:36
3

Here's the short version:

  • Create a new blank SP project in Visual Studio.
  • Add a new module and add your master page to this (in your case a copy of the Seattle master page with your changes). Configure this module to deploy to the master page gallery.
  • Add a new feature (site collection scoped most likely)
  • Include the module in the feature
  • Add a feature receiver (right click on the feature to see this option)
  • Set the master page for each web as required in your feature receiver (See: SharePoint SPWeb - MasterUrl Vs. CustomMasterUrl)

This will require you to have access to Visual Studio and a minimal familiarity with the .NET object model and SharePoint development.

  • 1
    This's absolutely a right answer. – MikeTran13 Jan 24 '14 at 3:09
  • So I've done something similar previously but does this only apply to publishing sites? How does it work when a new team site is created for example? – Andrew Jan 27 '14 at 10:08
  • You can use an event receiver to activate the feature on newly created sites, or use feature stapling to activate the feature on new site collections (or both). – RJ Cuthbertson Jan 28 '14 at 14:01

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.