4

There are lot of Masterpages available in out sharepoint designer, I want to update something in our current masterpage, but I'm unable to find which one we are using now.

I tried to click right click on masterpage and check set as default option is not getting on which masterpage, but it's showing that option to more than 6 masterpages, So is there any other simple way to find??

Suggestions will be highly appreciated, thanks in advance.

10

Hit following URL in your browser.

{site url}/_api/web?$select=CustomMasterUrl,MasterUrl

You will get following response.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="https://xxx.sharepoint.com/sites/sm/_api/">
   <id>https://xxx.sharepoint.com/sites/sm/_api/Web</id>
   <category term="SP.Web" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
   <link rel="edit" href="Web" />
   <title />
   <updated>2016-11-09T06:23:12Z</updated>
   <author>
      <name />
   </author>
   <content type="application/xml">
      <m:properties>
         <d:CustomMasterUrl>/sites/sm/_catalogs/masterpage/seattle.master</d:CustomMasterUrl>
         <d:MasterUrl>/sites/sm/_catalogs/masterpage/seattle.master</d:MasterUrl>
      </m:properties>
   </content>
</entry>

Now check the value of d:CustomMasterUrl and <d:MasterUrl>

OR

Make a GET request using this REST Client to above URL. It will show response in JSON format.

enter image description here

2

You can also run this simple Powershell script to check the masterpage in use:

 Add-PSSnapin Microsoft.SharePoint.PowerShell
 $site = Get-SPSite http://yourSiteUrl/
 $web = $site.RootWeb
 $web.CustomMasterUrl
 $web.MasterUrl
 $web.AlternateCssUrl
  • Dear sir, thanks for your response. I tried using powershell, but it's showing an error and also saying you dont have enough permissions to check this ,,etc. So please if you have any idea without powershell kindly tell me. – Asrar Nov 9 '16 at 6:02
  • try running Powershell ISE as an administrator ! @Asrar Rightclick on Powershell ISE and select Run as Administrator. – sam Nov 9 '16 at 6:04
  • did,but still same error :( – Asrar Nov 9 '16 at 6:05
  • The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered. getting the above error – Asrar Nov 9 '16 at 6:08
  • You can also do it from designer Go to masterpages folder and click on any of masterpage.master. If the masterpage is in use then the Set as Default masterpage and Set as custom masterpage will be disabled. Either or both. But if it is not in use either or both the buttons can be used to change the masterpage. – sam Nov 9 '16 at 6:09
0

If it is a Publishing site you can go in setting.aspx page

under look and feel -> Master page

You find the which page is applied.

If it is a Team site you browse with following url

http://<your site>/_layouts/15/ChangeSiteMasterPage.aspx
  • Dear sir, Thanks for your response,It's a public facing website I have checked in look and feel, it's showing "for site masterpage= "Coaf" and for syterm masterpage inherits from="seatile" now I went to the designer and right clicked on the coaf masterpage it's showing set as default masterpage option, my question is if it's our current masterpage then why it's showing that option?? – Asrar Nov 9 '16 at 5:56
  • Because custom master page is site master page used for publishing pages only and default master page is system master page,. That the reason "Coaf" is still have a option enable to set it default. – Ravindra Nov 9 '16 at 8:27

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.