Building public-facing websites using SharePoint 2007: custom branding and development

This is a second part of the blog post on building public-facing websites using SharePoint 2007. The first part was dedicated to the planning building public-facing websites using SharePoint 2007.

Start with the minimal master page

Create a new blank master page using SharePoint Designer. I do not recommend basing your first custom master page on existing master pages templates, as those usually have a lot of SharePointy fluff that you do not necessarily want on your page. Start from scratch and only add the stuff you want/nee into your master page. Remember you can always come back to that master page and add more stuff in it later, if needed. Here is an excellent guide from Microsoft on how to how to create a minimal master page.

Building content types and page layouts

Building content types and page layouts is done in the following order:

When creating page layouts, try keeping the number of created page layouts to a minimum. Remember that page layouts are to be used only to define common "layouts" of your site, and you do not need a separate page layout for every single page on your site. Keeping the number of page layouts to a bare minimum will not only keep the size of your content database(s) to a minimum, but it will also you're your site a lot easier to manage.

Custom XSLT

A lot of the stuff in SharePoint is customized using XSLT files. For example, pretty much everything in Custom Query Web Part can be customized in XSLT file. There is also built in XSLT files that allows you to customize they some of the SharePoint content looks:

XSL Style Sheet


Corresponding Web Part


"Application" XSL style sheet

Content Query


Group headers for Content Query and Summary Links, title headers for Table of Contents

Content Query, Summary Links, Table of Contents


Content Query and Summary Link item styles

Content Query, Summary Links


Table of Contents level styles, which includes the site and its pages

Table of Contents


"Application" XSL for Summary Links

Summary Links


"Application" XSL for Table of Contents

Table of Contents

Here is a guide on how to create custom item styles in SharePoint:

Source Control might save your…

It's always (and I mean always) a good idea to store your custom code in the Source Control such as Microsoft Team Foundation Server 2008. I strongly recommend that you store in the source control all your custom branding items: master pages, page layouts, CSS files, javascripts, images, configuration files, etc… Utilizing source control will not only allow you to keep a better track of the changes to your code, but it will also make it easier to integrate your custom code into the rest of your SharePoint deployment solution.

Use features to deploy

Features in SharePoint could be used to optimize the process of deployment and re-deployment of SharePoint master pages and page layouts. Here is couple of guides on how you can deploy master pages and page layouts as a feature: and

Also, you can use features to deploy reusable content, such as stylesheets, images, javascript files, configuration files, and, of course, the static pages that will always appear on the site (contact us, careers, etc.). This way moving that content between servers (between staging and production servers, for example), can be done using a simple mouse click (or two) instead of manually re-creating that content every step of the way.

Naturally, there is a lot more to SharePoint custom branding to development, but those are the items that I remember off the top of my head. I will update the blog post if I remember anything else.

Meanwhile, the next topic of this blog post series is everything about SharePoint search functionality on public facing websites.

Related resources: