managing master pages using spservices?

Mar 11, 2011 at 9:30 PM

Hi Marc,

Looking through the documentation and the list of available web services in sharepoint 2010 I didn't see anything that would allow one to write some javascript to change the master page on a site collection in code?  Do you know if this is possible?  I am assuming that it would be possible to upload a new master page file to the master page document library since it is just a doc library?

Thanks!

Nathan

Coordinator
Mar 12, 2011 at 3:08 AM

Nathan:

I think my question on this one is why you'd want to do it. Master pages aren't something you should want to change very frequently (after initial build) and you should just do it directly with SharePoint Designer.

If I'm off base, can you explain more about hwat you want to accomplish?

M.

Mar 12, 2011 at 3:02 PM

Marc,

Good question.  I am trying to install and manage master pages across a large set of site collections (> 200)  and we are part of the no-custom-code-cabal, so I'm looking for an alternative via SPServices and/or sharepoint2010 web services.  I agree it is best to install it once and leave it alone, but there are times when we need to tweak things (rare) so having a mechanism to do this without custom code would be ideal.

Thanks!

Nathan

Coordinator
Mar 13, 2011 at 4:58 AM

Nathan:

I think you're trying to use script here in a way that I would discourage. The right way to deploy a master page change to 200 Site Collections is as a solution. If you need to make one off changes, I'd suggest using SharePoint Designer.

If you have rules in place which prevent this sort of change, then you should be having discussions with whomever to devise a workable process.

M.

Mar 14, 2011 at 7:14 PM

Marc, I was hoping to avoid it, but doing the harder thing is probably best long term here.  Thanks for the input!

Nathan

Coordinator
Mar 14, 2011 at 7:36 PM

Yeah, governance is a pain when it's in your way, but there *could* be a good reason.

You could also look at the Copy Web Service, but I don't think it'll work across Site Collections.

M.