I am new to SharePoint 2013 . and I have been asked to do a lot of modification to the SharePoint 2013 layout and CSS. So I have created custom CSS inside my document library, but some changes were not achievable without directly modifying the seatle.master page, these modification to the sealt.master which I did include:-

  1. Removing some sections.
  2. Moving the place of some sections.

But lately I have read that we should avoid directly modifying the seatle.master page, and instead we should be modifying the html version of that page. Currently I have almost done all my work on the staging server, and I am planning to start moving my sits to production server so my questions are:-

  1. should I remove all the modification which I made to the seatle.master page (I have copies the original one), and do the modification to the html pages instead.

  2. Second question, what are the risks of moving my SharePoint sites to the production , while having the layout changes being implemented directly inside the seatle.master page ?

Can anyone advice please?

  • 2
    Why not make the changes to the Seattle, but save and upload them under a new file name (ergo, as a modified copy)? – Robert Lindgren Sep 24 '13 at 19:22
  • what will be the advantage of doing this ? can you explain in more details please? – john Gu Sep 24 '13 at 20:24
  • 1
    You will eg not be at risk of getting your changes written over by future Microsoft updates – Robert Lindgren Sep 25 '13 at 5:48
up vote 3 down vote accepted

If you will bear with my I will first answer a question you did not ask, and then I'll get to your actual question.

What did you modify exactly, the file on disk or on the web site (through SharePoint Designer or a mapped drive) ?

If you have modified the file on disk, you should copy your changes some place safe (for later, see next) and immediately revert to the original file. Any modification to SharePoint's OOTB files are bound to a) cause loads of problems and b) be overwritten by future updates. By modifying the file on disk you are effectively changing the master page for each and every existing site that uses that style. Most files you see in a web site are in fact links to the file on disk until they are customized (next paragraph).

If you have modified the file in the web site (in _catalogs/masterpage), in effect you have customized the file, that is you have detached it from its source definition on disk and created a local copy that now lives in the database, only for that site.

What a customized file means is: - You will need to re-apply those changes manually to any other site where you want it as they are all independent. This includes production, future sites, etc. - All of those sites, after you have modified them directly, will have their own independent copy of the file which are not related to one another so you will not be able to make mass updates to your branding.

If you have only one site at this time, you might think you are ok. But SharePoint has a tendency to grow...

If you are doing custom branding, the bare minimum would be to make a copy of seattle.master to a custom name, and work on that. That will avoid you the interference headaches with official updates and modifications to the standard master page (which you should keep as fallback should things go wrong).

Next, you should really consider a deployment package (e.g. a file on disk). Then when you create a new site, you just set it to use that master page (manually, through feature activation, at this point it does not matter). This way, all of your sites will still use an un-customized master page, meaning they will in fact all be references to the one on disk. This makes updates much easier and is the norm in enterprise settings. The same goes for your CSS and JS files.

You could have CSS and JS files in the _layout directory but for this you really want a deployment package, never drop files there manually.

And now, to specifically answer your original question:

The difference between the .master and .html pages is not that much, but you can view .html as preceding the .master. Some master pages do not have an associated .html page, but if you upload a .html file SharePoint will automatically create a .master. The latter is the one that is used in the end, with the .html being more of a "designer file" and is easier to work with for most HTML folks (has all the markup as comments, so you have fewer chances of wrecking the final ASPX markup).

So, if you have both, work on the .html file. If you have only the .master, work on that one. What you should avoid is uploading a .html file, then working on both the .master and .html files because every time you save the .html SharePoint will overwrite your .master. Once the .master is generated the .html is mostly ignored by the system.

Hope that clears things up a bit.

I would not advice to edit the Seatle.master. Instead I'd advice you to just take a copy of it and rename + edit the copy. In that way, in case anything goes wrong, you still have a solid fallback masterpage.

Why some may advice to edit the html version, that is to support the Design Manager - But that method is primarily opinion-based.

Regarding your question about moving your SharePoint sites from one server to another while having layout changes being implemented, there shouldn't be any fatal risks as your changes only affects the cosmetic parts of SharePoint.

  • 2
    Agree with Daniel. It is best to make a copy so you can revert easily. – John Chapman Sep 24 '13 at 19:46
  • i made a cop of the seatle.master , and i modified the original one. but currently i have a copt of the seatle.master without any modifications. – john Gu Sep 24 '13 at 20:18
  • But from what i understand is that incase i am modifying the seatle.master direclty, all the changes might be lost if i update the SharePoint or apply future updates and releases, . is this point true? – john Gu Sep 24 '13 at 20:22
  • @johnG Yes that is true. Modifying SharePoint defaults will always have a risk of being reset if an update is rolled out. – user2536 Sep 26 '13 at 19:17

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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