Branding Office SharePoint Server 2007 Web Content Management solutions reaches beyond development and is done in most scenarios by webdesigners. Once done the templates are being sliced into pieces and incorporated in SharePoint. To simplify the work, SharePoint community has created a Minimal Master Page: a template which contains all the elements required by SharePoint. Just recently I have noticed that using that template for branding is rather harmful and can lead to even more problems instead of sparing you the time.
Designing for the Web and developing are two different disciplines.
Designing for the Web and developing are two different disciplines. Designing requires different skills and experience and is therefore done in most scenarios by a different group of people than SharePoint developers. Because devigners (people who can both develop and design) are very rare, in most scenarios you – SharePoint developer will have to do it with designers who will provide you with the templates for the WCM solution.
I’ve been working with SharePoint for almost two years now. What I noticed is that many SharePoint developers know very little about webdesign and accessibility. While they know really a lot about SharePoint and all the others server-side technologies, they have little to none understanding of how the Web, CSS and HTML really work. It’s not that bad while developing a web application but if you are working on a serious Web Content Management solution, you are in trouble.
As soon as you paste the pieces of HTML into Master Page and Page Layouts it seems like SharePoint is changing the way the things are rendered
In the last two years I have met quite a few developers who were complaining about how difficult it is to get the branding working in SharePoint. As soon as you paste the pieces of HTML into Master Page and Page Layouts it seems like SharePoint is changing the way the things are rendered. Not surprisingly all of them were using the Minimal Master Page to speed up the branding process and just to be sure that they’ve got all the controls required by SharePoint. So what is actually wrong with the Minimal Master Page?
Mind the doctype!
Next to all the controls and placeholders required by SharePoint the Minimal Master Page contains the doctype. What many developers don’t know is that the browser renders the page using the doctype information. What it means is, that if you take design created using the XHTML 1.0 Strict doctype and embed it in SharePoint using the XHTML 1.0 Transitional doctype, there is a chance that the layout will break. Eric Meyer has covered all the different issues in his article Picking a Rendering Mode.
Changing the doctype afterwards might lead to most weird rendering errors which debugging might costs you hours
Because the Minimal Master Page already contains a doctype, many developers think that this is the way the thing must be. They proceed directly to embedding all the other elements missing in the Minimal Master Page, forgetting to copy the doctype declaration as provided in the templates. Changing the doctype afterwards might lead to most weird rendering errors which debugging might costs you hours.
Using the Minimal Master Page is not wrong – not at all. Since I started working with SharePoint, I have created my own Minimal Master Page. Because it’s a template, it saves you lots of time and allows you to focus on the solution-specific work. What you should remember is to always copy the doctype from the templates you received from the designers. In many situations it will save you a lot of frustration and debugging.
















September 29th, 2008 at 11:14 am
Hey Waldek, another great post
Learned it the hard way whaha.
Keep on posting, and who knows?
Maybe you will infect me soon with the blog virus.
September 29th, 2008 at 11:54 am
Hope so, mate!
September 30th, 2008 at 6:46 am
So, is using the Minimal Master Page actually a good idea, as long as you use the right doctype? And why did you decide to devign (no typo) your own Minimal Master Page? Does it improve on the community version?
And where can I download it?
Anyway, thanks for the info.
September 30th, 2008 at 7:38 am
Hi Paul, thanks for the comment.
Using the right doctype is more important than many people think. It's not only a line of code in your Master Page. The doctype defines how the whole page should be processed by a web browser.
The Master Page I use contains a common set of controls we use in every SharePoint WCM project we work on. You could think of it as of an extended version of the community Minimal Master.
September 30th, 2008 at 10:24 pm
Waldek:
I always appreciate your posts. Keep them coming!
I agree with you about the DOCTYPE. As a devigner, I am very frustrated with developers just not getting it.
However, I don't see a better alternative for developers than to use a minimal master. Your post title implies it's a bad idea. I think it's really the best way, web developers just need to learn more about web standards.
September 30th, 2008 at 10:40 pm
Hi Ted, thank you for your comment.
The Minimal Master is meant to save some time. But if the developers forget to use the right doctype they will end up spending even more hours. While SharePoint will return immediately an error when you skip even one required Content Placeholder, there is no such thing for the doctype. It's definitely about the knowledge and understanding of what you're actually doing.