1

we have masterpage on sp2013.

When we set masterpage to default then at what scope does it get applied?

a. site?

b. site collection?

c. web application?

How can we apply the same masterpage for entire sitecollection? Suppose I do it using powershell, then can it be inherited by sites which will be created at later point in time? (is feature stapling solution?)

For example; we create a new site, then that should also have the custom masterpgae.

1 Answer 1

7

MasterPage is always deployed at site collection scope. If you want to set your masterpage as default masterpage below are the common methods:

  1. Write code in a feature receiver.
  2. Through Powershell commands
  3. Through UI (SharePoint Publishing Infrastructure and SharePoint Publishing feature needs to be activated to do this.)
  4. Through SharePoint designer.

Now if you want to apply this masterpage to all sub sites in the site collection , make sure below things are done:

  1. Feature "SharePoint Server Publishing Infrastructure" should be activated for the site collection.
  2. Make sure "SharePoint Server Publishing" is activated in the sub site.You can use feature Stapling to acheive this(Or manually activate or using powershell activate feature.)

If you wish not to activate publishing feature, then write feature event receiver code which will set custom master page as default master page and activate that feature when ever sub site is created(again using stapling or powershell or manually through UI).

4
  • very very helpful.
    – variable
    Mar 26, 2014 at 7:29
  • So my options are only 2: 1. use feature stapling or 2. use powershell every time new site/subsite is creatd that sets the masterpage as default for each site in sitecollection. correct?
    – variable
    Mar 26, 2014 at 7:32
  • Can you provide me any reference link for the feature stapling method for masterpage?
    – variable
    Mar 26, 2014 at 7:33
  • 2
    @variable, there is such a thing as Google for all of your small questions you know ;) Mar 26, 2014 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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