Branding in SharePoint Technologies (PART 3)
Today we will look 3 options available for the modification of Site Master Pages. They include SP Designer, Site Template and File System options.
SP Designer: SP Designer is the newer version of front page extensions with additional capabilities to do some of the basic functionalities of SharePoint like editing the master page, page layouts, pages including designing simple workflows for the lists and libraries. This tool can be used to do branding (customizing the master pages) for a given Web Application/ Site Collection.
As discussed in the Table in Part 2 (Types of Master Page), all master pages which are site pages ( but not application pages) are specific to a site collection and there will be one default site collection in every Web Application. When one says the branding is being done in SP Designer for a Web Application, it is actually the branding done for the default site collection; since, the master pages are site-collection specific.
To do the customization, the developer has to go to the master page gallery and modify the master page after checkout, and then do check-in back. Once saved, this will be saved to the content database as an un-ghosted page.
So the question is what if the Web Application has lot of site collections within it in addition to the default site collection. If one has to use this approach, then the developer will have to go to each and every site collection, and then go to the master page gallery and replace the master pages to keep them in synch with the rest.
So to summarize this approach, it will be a good option as long as the number of site collections is very small preferably one for a Web Application. With the increase in the number of site collections, the maintenance effort increases and this option may cease to be a good fit.
Site Template: Before we get into the details of branding using the site template option, let us first understand what a site template is. A Template is an entity that is used to rapidly create items matching its structure. A Site Template does the same thing. It is used to create sites matching the structure of the site, which is a part of the template. It is typically stored as a Site Template Pack (STP)file. This can be created using any one of the following options:
· Using the ‘save as site template’ using the look and feel section of the modify site settings page
· Using SharePoint Designer
· Using the savetmpl.aspx in the layouts folder
Note: Publishing sites have an issue in using the stp file. For more information on this and the related KB article, see http://blogs.technet.com/stefan_gossner/archive/2007/09/19/save-site-as-template-option-and-the-publishing-feature.aspx
In this approach, all the changes required for the master pages are saved (un-ghosted) into the database. On creation of the stp file, all these details will be stored in the file so that when a new site is created using this template then the branding is automatically ensured.
Some of the issues associated with this approach are:
· If the end user/ administrator use any of the out of the box templates, the custom branding will not be applied and will result in inconsistencies.
· Maintenance will be tedious owing to the high number of custom templates. A one-to-one mapping of templates creation is required for all the out of box templates.
· Post-provision of the sites if the Templates are changed for branding reasons, the existing sites will continue to have the old branding as the work of the template gets over once the site is provisioned. Sites newly provisioned using these templates will have the changed branding.
File System: This is the simplest of all the options. When a site is being provisioned from site definitions, the site gets created using the master pages that reside on the file system which are mapped to the site definitions. These various master pages that reside on the file system are edited to match the custom requirements. This can be done in any editor and is outside the scope of any Web Application as it is done at the file system level. However caution as to be exercised for two reasons:
· Since all the site definitions use these files during site provisioning, the same branding will be made available to all the sites/Web Applications that are provisioned in that machine/Farm
If Microsoft releases a patch or a service pack that updates these files, caution has to be exercised before applying the same since they might overwrite the files
We will look at the other 2 options of Site Definitions and Features in the next blog part of this series
