Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've got a branding feature, deployed in multiple site collections, including the master and system master pages.

The goal is that if a power user does some changes to one of these master pages, these changes are propagated throughout all site collections.

I've read some suggestions about using a module to deploy the pages centrally, but that still doesn't meet my requirements because file is unghosted when edited with SPD, and changes are not propagated.

Anyone has any deployment strategy suggestion to cater for this requirement?

share
    
How and where does the powerusers edit the master page? –  Anders Rask Nov 10 '11 at 7:00
    
@AndersRask SPD on provisioned sites –  Jorge Carvalho Nov 11 '11 at 2:27

2 Answers 2

up vote 4 down vote accepted

The best approach is to use main master page (with only test pages attached) placed in a document library, and track changes to the file made using SPD and if any changes are made - update ghosted master page in file system accordingly, all other master pages are deployed via modules and are ghosted versions of one in files system. After changing file system master page you need to make recycle of app pools to apply changes to all master pages.

Tracking changes can be implemented via event receiver. Making it a little configurable, you can use this approach with several master pages.

share
    
Thanks @default. So if I got you right, the main pieces here are: The web template that is used to create these site collections, includes the module with the reference to the unghosted file. Then, on a separate site, have a library holding the "Master" master page, and an event handler to track changes and replace the instance on the file system. I'll have to give it a go. Thanks! –  Jorge Carvalho Nov 11 '11 at 2:29
1  
@Jorge if you have more than one web front-end you'll need to replace the file on the file system on each. –  Paul Lucas Nov 11 '11 at 4:36
    
Yea, there is such an issu, which can be resolved using a web service (WCF, asp.net or a custom handler) that is deployed with main part of solution to all servers. Using Farm.Local.Server you can get all servers with WFE role, and make a call from event receiver to web service, which will execute the same file master page update method as the event receiver. –  Yuri Leontyev Nov 11 '11 at 6:42

Just an idea... Maybe you could create a webpart that you deploy on central admin. This webpart has for example a combobox where you can select the masterpage. And when selected a new one, you change all sites in all sitecollections of the selected web application (or farm) to the selected masterpage.

share
    
In @default approach you do not need to do extra operations. You should only to make changes in Master Page or overwrite existed one. The system does needed operations automatically. –  Alexander Nov 10 '11 at 8:23
    
But if you need to have 4 masterpages available for example, you can't in your case. The masterpage will always be overwritten. In my case you can have 4 masterpages and switch easily between them. –  Ruben Herman Nov 10 '11 at 8:36
    
In this case you can turn on Versioning for the library and use different version of file. –  Alexander Nov 10 '11 at 8:53
    
I think you can use several master pages for that case. 3 sites use default.master, 2 sites - default_min.master. You have one library with 2 this files, when any updated, receiver updates related file in file system. Also that would work when you will need to update master pages with new design or design changes. In case of unghosted pages - you will need to update each page manually to a new design. That can give a lot of headache in future. –  Yuri Leontyev Nov 10 '11 at 8:58

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .