List all Master Pages used in a Site Collection
-
16-10-2019 - |
Question
In a SharePoint (MOSS 2007) environment how can I list all the Master Pages (templates) that are used in a site collection? I need to add some code to the header of every master page, but there are a lot of subsites and I don't want to have to go to each subsite and check which master page it is using.
Solution
The master pages available in the Master pages and page layouts gallery at the root site of the site collection are available to all its sub sites. So you need update all the matser pages in there with the required headers.
Once this is done, changes would automatically reflect on all sub sites in that site collection using those master pages.
note: the master pages must be checked-in are approved after the updates