Professional Documents
Culture Documents
Patrick Tisseghem
U2U
March 2006
Applies to:
Microsoft Windows SharePoint Services (version 2)
Summary: Learn how to create a custom site definition for Microsoft Windows SharePoint
Services sites. This article provides an understanding of how Windows SharePoint Services V2
site definitions work internally and how the Collaborative Application Markup Language
(CAML) defines the structure of lists and views. (18 printed pages)
Contents
Introduction to Creating Site Definitions
Creating the Seminar Site Definition
Creating the List Definition
Summary
Additional Resources
About the Author
Introduction to Creating Site Definitions
This article discusses how to create a custom site definition for Microsoft Windows SharePoint
Services (version 2) team sites. The goal is to provide you with a good understanding of how
Windows SharePoint Services V2 site definitions work internally and how the Collaborative
Application Markup Language (CAML) defines the structure of lists and views.
You can follow along with this article as I walk you through a step-by-step example of creating a
simple custom site definition for storing and delivering information associated with a training
seminar. My goal is to keep the instructions simple but educative so that you can relate
everything I discuss to your own types of team sites.
Creating the Seminar Site Definition
Several MSDN white papers (listed at the end of this article) discuss how to create your own
custom site definition by making a copy of an existing default site definition supplied by
Microsoft. A good one to use is the SharePoint team site definition, physically represented by the
STS folder found at drive:\Program Files\Common Files\Microsoft Shared\web server
extensions\60\TEMPLATE\1033 on the server that is running Windows SharePoint Services.
Your copy of that site definition has the same functionality and look and feel as the default
SharePoint team site. You can modify this site definition to customize it. Before your custom site
definition becomes active, you must create a copy of the Webtemp.xml file and modify its
content. After you perform an iisreset command, your site definition becomes visible in the
template picker page. Find more information and step-by-step guides in the additional resources
listed at the end of this article.
The site definition I show you how to create is very simple and has limited features. The goal of
the article is to give you insight into how the different components that compose a site definition
interact with each other and what CAML elements you need to understand to create more-
complex site definitions. A copy of the complete STS default site definition is too much to
accomplish in the space allowed for this article. I therefore create the necessary site definition
infrastructure manually. I do copy some files, though, just to simplify the work.
The Minimal Site Definition Infrastructure
Site definitions are collections of physical files located in drive:\Program Files\Common
Files\Microsoft Shared\web server extensions\60\TEMPLATE and in language-specific folders
(such as 1033 for English-US) under it. You perform the initial work for the custom site
definition in this folder.
Follow these steps to create the initial minimal site definition infrastructure. I expand the various
components step-by-step later in the article.
1. Create a new subfolder named SEMINAR under drive:\Program Files\Common
Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033. The name of the
folder must use all uppercase letters.
2. Every team site has a home page typically represented by a physical file named
default.aspx. The default.aspx page from the STS folder is a good candidate to start with.
You customize it later for this project. So copy this default.aspx into your own
SEMINAR folder.
3. Also copy the XML subfolder from the STS folder. In it are three important XML files
that Windows SharePoint Services uses to get your site up and running.
1. Onet.xml provides Windows SharePoint Services with information about the
navigation, lists, and document libraries that users can create; the templates for
the document libraries; the base list types, and the possible site configurations.
2. Stdview.xml is the configuration file containing the definition of the standard
views upon which you can base your own custom views.
3. Vwstyles.xml defines the various styles for creating new views.
4. To conclude, create a second subfolder named LISTS and copy the subfolders
CUSTLIST and WPLIB from the LISTS folder in the STS site definition folder.
Figure 1 shows the initial framework of the site definition.
Figure 1. Initial site definition framework
Modifying the Onet.xml file
The first file to examine in closer detail is Onet.xml. It is an extremely important file within your
site definition. Figure 2 summarizes the six major sections within Onet.xml. The Project element
encapsulates all of them; I simply modify the Title attribute of this element to store the title of
the custom site definition.
<Project Title="Seminar SharePoint Site" ListDir="Lists"
xmlns:ows="Microsoft SharePoint">
Figure 2. Components of the Onet.xml file
Let's look at each section more closely.
• The NavBars element defines the navigation infrastructure on the pages that compose the
team site. The seminar site requires minimal navigation: a link to the home page, the
agenda of the sessions, the speakers page, and the document library where the
presentations and samples for download will be stored.
The Quick Launch navigation elements are not used for this example. So you can remove
the definition of it in the Onet.xml file. The only navigation bar we need (represented by
the NavBar element) is the horizontal one at the top of the page.
• Three NavBarLink elements define the hyperlinks. You provide the NavBarLink
element with a name and the URL for the page to display.
• <NavBars>
• <NavBar Name="SharePoint Top Navbar"
• Separator="&nbsp;&nbsp;&nbsp;"
• Body="<a ID='onettopnavbar#LABEL_ID#'
• href='#URL#' accesskey='J'>#LABEL#</a>" ID="1002">
• <NavBarLink Name="Agenda Sessions"
• Url="Lists/Sessions/Agenda.aspx">
• </NavBarLink>
• <NavBarLink Name="Speakers"
• Url="Lists/Speakers/AllItems.aspx">
• </NavBarLink>
• <NavBarLink Name="Downloads"
• Url="Lists/Downloads/AllItems.aspx">
• </NavBarLink>
• </NavBar>
</NavBars>
• The next block, the ListTemplates, defines all the lists and libraries you make available
for your site definition. In the example, you create two custom lists (one to store session
information and one for the speaker information) and one custom document library (to
store the downloadable files). For now, remove all except the custom list, the document
library, and the internal lists (the galleries for the Web Parts and templates) necessary for
a top-level team site.
• <ListTemplates>
• <ListTemplate Name="custlist" DisplayName="Custom List" ...
• <ListTemplate Name="doclib" DisplayName="Document Library" ...
• <ListTemplate Name="webtemp" DisplayName="Site Template Gallery" ...
• <ListTemplate Name="wplib" DisplayName="Web Part Gallery" ...
• <ListTemplate Name="datasrcs" DisplayName="DataSources" ...
• <ListTemplate Name="listtemp" DisplayName="List Template Gallery" ...
</ListTemplates>
• The DocumentTemplates, as you might expect, define the templates for the document
libraries. For this example, delete everything except the minimum that the site requires.
Keep only the definition for the document library that uses no templates.
• <DocumentTemplates>
• <DocumentTemplate Name="" DisplayName="None" Type="100"
• Default="FALSE"
• Description="This document library will not use templates.">
• </DocumentTemplate>
</DocumentTemplates>
• The BaseTypes block defines the five different types of lists with which users can work
on team sites. Do not change anything in this block; simply leave it as it is. Every
BaseType definition includes the various field types and the ways they are rendered in
the various modes (edit, new, and view mode).
• <BaseTypes>
• <BaseType Title="Generic List"
• Image="_layouts/images/itgen.gif" Type="0">
• ...
• </BaseType>
• <BaseType Title="Document Library"
• Image="_layouts/images/itdl.gif" Type="1">
</BaseType>
• A site definition can have multiple configurations, each represented by the
Configuration element. Examine the default STS site definition. You can see that the
blank team site and the default team site already contain some instances of lists and Web
Parts added to the home page. The seminar site definition has only one configuration. The
internal lists will be created, and on the home page you will have an empty Content
Editor Web Part that can be used by the administrator to provide a description of the
seminar. An image Web Part shows a default image. In the configuration section, you
point to the module where the Web Parts to be added will be defined.
• <Configurations>
• <Configuration ID="0" Name="Default">
• <Lists>
• <List Title="Site Template Gallery" Type="111"
• Url="_catalogs/wt" RootWebOnly="TRUE" />
• <List Title="Web Part Gallery" Type="113"
• Url="_catalogs/wp" RootWebOnly="TRUE" />
• <List Title="List Template Gallery" Type="114"
• Url="_catalogs/lt" RootWebOnly="TRUE" />
• </Lists>
• <Modules>
• <Module Name="Default"/>
• <Module Name="WebPartPopulation"/>
• </Modules>
• </Configuration>
</Configurations>
• The Modules section is the last one to consider. Within the Configuration element, I
defined a link to two modules: Default and WebPartPopulation. The first one defines
what needs to be dropped at the start on the home page and the second one fills the
internal Web Part gallery with the two Web Parts users can drop on the Web Part Pages.
The Web Parts placed on default.aspx are defined by the AllUsersWebPart element.
• <Modules>
• <Module Name="Default" Url="" Path="">
• <File Url="default.aspx" NavBarHome="True">
• <AllUsersWebPart WebPartZoneID="Left" WebPartOrder="1">
• <![CDATA[
• <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
• <Assembly>Microsoft.SharePoint, Version=11.0.0.0,
• Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
• <TypeName>Microsoft.SharePoint.WebPartPages.
• ContentEditorWebPart</TypeName>
• <Title>Welcome to the conference site</Title>
• </WebPart>
• ]]>
• </AllUsersWebPart>
• <AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
• <![CDATA[
• <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"
• xmlns:iwp="http://schemas.microsoft.com/WebPart/v2/Image">
• <Assembly>Microsoft.SharePoint, Version=11.0.0.0,
• Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
• <TypeName>Microsoft.SharePoint.WebPartPages.
• ImageWebPart</TypeName>
• <FrameType>None</FrameType>
• <Title>Site Image</Title>
• <iwp:ImageLink>/_layouts/images/homepage.gif
• </iwp:ImageLink>
• </WebPart>
• ]]>
• </AllUsersWebPart>
• <NavBarPage Name="Home" ID="1002" Position="Start">
• </NavBarPage>
• </File>
• </Module>
• <Module Name="WebPartPopulation" List="113" Url="_catalogs/wp"
• Path="lists\wplib\dwp" RootWebOnly="TRUE">
• <File Url="MSContentEditor.dwp" Type="GhostableInLibrary"/>
• <File Url="MSImage.dwp" Type="GhostableInLibrary"/>
• </Module>
</Modules>
For now, that is everything you change in Onet.xml. Later we return to it to define the custom
speaker list.
Making Changes to the Home Page
The home page (physically represented by default.aspx in your site definition folder) is a normal
ASP.NET page filled with controls that are specific to Windows SharePoint Services and
Microsoft FrontPage components. Figure 3 depicts the elements that compose the home page.
Dino Dato-on
Jinger Zhao
Microsoft Corporation
May 2004
Applies to:
Microsoft® Windows® SharePoint™ Services
Microsoft Office SharePoint Portal Server 2003
Microsoft Office FrontPage® 2003
Summary: The first of three companion articles. Learn ways you can customize a SharePoint
site and an area; manage users, sites, and templates; change the structure of pages in a site;
manage user access; and optimize style sheets. Then go on in Customizing SharePoint Sites and
Portals: Using Templates and Site Definitions, Part 2 to create and edit a site using templates and
site definitions. Finally, see Customizing SharePoint Sites and Portals: Style Sheet Class
Reference Tables, Part 3. (14 printed pages)
Contents
Introduction
Customizing a Portal
SharePoint Sites vs. Portal Areas
Customizing a SharePoint Site
Using FrontPage to Change Site Appearance
Conclusion
Introduction
Microsoft® SharePoint™ Products and Technologies consists of Microsoft Office SharePoint
Portal Server 2003 and Microsoft Windows® SharePoint Services. SharePoint Products and
Technologies use Microsoft Windows Server™ 2003 and the .NET Framework. This latest
version offers improvements in the customization, development, and deployment of an enterprise
portal and team collaboration infrastructure.
Customization is the ability to change the layout, view, content, and site structure for a group of
users such as a department or corporation. To help ensure consistency, Windows SharePoint
Services and SharePoint Portal Server 2003 enable only Web Designers and Site Administrators
full customization privileges for managing the look and feel of a site.
SharePoint Portal Server enables you to create Web portals that aggregate information from
various sources into one convenient page. Team members and users can reach important business
information, documents, and applications from one central access point.
The portal architecture and Web Part components determine how a site appears and manage all
browser functions. Each portal site consists of reusable and customizable Web Parts that
determine how information is presented. Administrators and site owners can use these
components to customize how a Web portal looks and functions. You can modify existing Web
Parts or create your own to achieve a unique look for your organization's site.
An individual user can also import Web Parts from a catalog or from Microsoft Office System
applications to create his or her own personal portal view that organizes and presents only the
information he or she wants.
Customizing a Portal
You can customize the portal to offer individual users a unique view based on their specific
interests. You can push dynamic information to certain users that meet a particular set of
credentials, are part of a group membership, have specific interests, or are in a particular job
category.
The Portal Structure and How it Works
Windows SharePoint Services and SharePoint Portal Server 2003 support the portal structure.
Windows SharePoint Services connects the Windows SharePoint Services components used to
create individual SharePoint sites, and SharePoint Portal Server 2003 combines the Windows
SharePoint Services-based sites into one convenient package.
The portal uses a front-end Microsoft Internet Information Services (IIS) Web server to store
style sheets, templates and associated scripts, executable files, and dynamic-link libraries (DLLs)
with an ISAPI filter. A Microsoft SQL Server™ database stores metadata for the content used to
populate the panes in the templates. User customization and authorization information is also
stored in the SQL Server database.
Dino Dato-on
Jinger Zhao
Microsoft Corporation
May 2004
Applies to:
Microsoft® Windows® SharePoint™ Services
Microsoft Office SharePoint Portal Server 2003
Microsoft Office FrontPage® 2003
Summary: The second of three companion articles. In Customizing SharePoint Sites and Portals,
Part 1, you learned ways to customize a SharePoint site and an area; manage users, sites, and
templates; change the structure of pages in a site; manage user access; and optimize style sheets.
In this article, we provide more details by creating and editing a site using templates and site
definitions. Customizing SharePoint Sites and Portals: Style Sheet Class Reference Tables, Part
3, provides valuable style sheet class reference tables. (20 printed pages)
Contents
Introduction
Creating Custom Templates
Creating Site Definitions
Using Site Configurations
Using Modules
Field Definitions Using SCHEMA.XML
Customizing Portal Areas Using Templates
Guidelines for Using Templates and Site Definitions
Conclusion
Introduction
Microsoft® SharePoint™ Products and Technologies consists of Microsoft Office SharePoint
Portal Server 2003 and Microsoft Windows® SharePoint Services. SharePoint Products and
Technologies use Microsoft Windows Server™ 2003 and the .NET Framework. This latest
version offers improvements in the customization, development, and deployment of an enterprise
portal and team collaboration infrastructure.
Customization is the ability to change the layout, view, content, and site structure for a group of
users such as a department or corporation. To help ensure consistency, Windows SharePoint
Services and SharePoint Portal Server 2003 enable only Web Designers and Site Administrators
full customization privileges for managing the look and feel of a site.
Templates and Site Definitions
There are two ways you can customize SharePoint sites. You can use custom templates or create
site definitions. Custom templates enable you to customize a site by using the user interface (UI).
For example, you can derive a custom list from an existing list, or create a custom list to use as a
list template that Site Administrators can choose from a list of available list templates. Windows
SharePoint Services stores all custom templates in the content database. You can customize list
and site templates from Top-level Site Administration or by using Microsoft Office FrontPage
2003. For more information about using FrontPage to customize SharePoint sites and portals, see
Customizing SharePoint Sites and Portals, Part 1.
Site definitions are composed of multiple files located in the file system of each Web server. Site
definitions and templates work together to customize a site. Custom templates are always
associated with the site definition on which the template is based. A custom template depends on
the base site definition in the file system in order to work. A custom template is the difference
between a site definition and the state of the site after a template is generated. The template
tracks changes to the site definitions that are stored in the configuration database. This article
describes the advantages and disadvantages of using custom templates and site definitions and
provides guidance about when to choose one over the other, and how to avoid overwriting
custom templates and site definitions when installing product updates.
Creating Custom Templates
Now that we know that custom templates track changes to a SharePoint site definition, we can
examine the different types of custom templates. List templates track changes to columns, forms,
pages, and optionally, changes to the content associated with a specified list. Site templates track
changes to site navigation, Web Parts, lists present on a site, and optionally, changes to the
content of a single site. You can save an existing site as a site template.
Note There is a 10 MB quota on the total size of the content you can store in a site template.
You can determine the size of site content by going to Top-Level Site Administration, and in
the Management and Statistics section, clicking View site usage data.
A custom template is persisted as a file with an .stp extension, which is actually a .cab file that
you can rename with the .cab file extension and open in Windows Explorer. This file includes
one Manifest.xml file in Collaborative Application Markup Language (CAML) that the server
generates as a subset of the Microsoft SharePoint Migration Tool (Smigrate.exe) manifest file
format. For more information about SMIGRATE, see "Introduction to Templates and
Definitions" in the Microsoft SharePoint Products and Technologies 2003 Software
Development Kit (SDK).
Let's say that you created a site, customized it by adding lists, events, document libraries, custom
Web Parts, and applied a special theme. You want to share this piece of work with other site
owners or impose this site template on any subsites. On the Site Settings menu, click Go to Site
Administration, and then in the Management and Statistics section, click Save as template.
Type a file name using an .stp extension and type a title and description for your site template.
You can also select the Include content check box. You save your site as a template in a gallery
inside the content database to make it available to other subsites. As long as subsequent subsites
are based on the same site definition (for example, on a Document Workspace) and have the
identical language of the original site, you can create subsites using this template.
To make the template appear in the list of templates in the Site Creation wizard, you need to
export the template to the file system and run the STSADM command tool. To export the
template, right-click the template and click Save Target As, and then follow the prompts to save
the template. After saving the template to the file system, from a command prompt, type the
following:
stsadm.exe -o addtemplate -filename "local_drive:\site_template_file_name.stp" -title
"Site_Template_Name"
Note You must reset Microsoft Internet Information Services (IIS) before these changes can
take affect. After resetting IIS, the Site_Template_Name template becomes available in the site
template list during site creation.
You can also export a list template the same way you exported the site template. However, list
templates are available only to the site collection of the site from which you exported.
About Collaborative Application Markup Language
Collaborative Application Markup Language (CAML) is an XML-based language used for
defining collaboration objects for a site. In Windows SharePoint Services, CAML defines sites,
lists, fields, views, or forms.
CAML essentially has two major types of elements—those for field rendering and schema
definition, and those for page rendering. For example, you can use the page-rendering CAML
elements when you need to extract the property of a specific field and render it on a page.
You can also use CAML to define tables in the site database during site provisioning. You can
use CAML to customize a SharePoint site and in SOAP messaging to Web services in Windows
SharePoint Services to interact remotely with a Windows SharePoint Services deployment.
Moreover, you can use CAML in script or code that implements members in the Windows
SharePoint Services object model. In this case, you pass CAML strings through method
parameters, assign them to properties, or return them by methods and properties.
For more information about CAML, see "Introduction to Collaborative Application Markup
Language (CAML)" in the Microsoft SharePoint Products and Technologies 2003 Software
Development Kit (SDK).
Creating Site Definitions
Site definitions are similar to templates. Site definitions are composed of several files located in
the file system on each Web server. The site definition files contain XML tags that define a
template for a site. The default site types included with Windows SharePoint Services are created
using site definitions (such as Team Site, Blank Site, Document Workspace, and so on).
Windows SharePoint Services creates a version of each site definition during installation. The
site definition files are stored in subdirectories in the following location:
Local_drive:\Program Files\Common Files\Microsoft Shared\web server
extensions\60\TEMPLATE\1033\
It is recommended that you create a custom site definition by copying an existing site definition,
rather than modifying the original files installed with Windows SharePoint Services. Changes
that you make to originally installed files may be lost when you install updates or service packs
for Windows SharePoint Services, or when you upgrade a deployment to the next product
version.
To create a site definition
1. Copy the existing site template folder in the following location:
2. Local_drive:\Program Files\Common Files\Microsoft Shared\Web Server
Extensions\60\Template\lcid
For example copy the site template folder and rename it "TRAINING".
3. Then copy the WEBTEMP.XML file in the following location:
4. Local_drive:\Program Files\Common Files\Microsoft Shared\Web Server
Extensions\60\TEMPLATE\1033\XML
5. Rename the file, for example, WEBTEMPTRAINING.XML.
During initialization, the compiler merges the information contained in files prefixed with
WEBTEMP*.XML and makes them available for creating sites. This provides easy
extensibility for third-party ISVs to create additional site definitions that integrate with
SharePoint Products and Technologies.
Note All areas in a SharePoint Portal Server deployment are stored in directories
that begin with /SPS*.
A site definition is composed of three main files: WEBTEMP.XML, ONET.XML, and
SCHEMA.XML. The following table shows the files' locations in the file system, and their
definitions.
Table 1. Site definition files
Site Definition
Location Description
File
WEBTEMP.XML Local_drive:\Program Files\Common Files\Microsoft Specifies
Shared\Web server extensions\60\TEMPLATE\1033\XML configurations
of lists and
modules for a
site definition.
Defines
navigation
bars such as
the top link
bar and the
Local_drive:\Program Files\Common Files\Microsoft quick launch,
ONET.XML
Shared\Web server extensions\60\TEMPLATE\1033\*\XML available lists,
document
templates,
base types,
configurations,
modules
Defines the
Local_drive:\Program Files\Common Files\Microsoft
columns,
Shared\Web Server
SCHEMA.XML views, and
Extensions\60\TEMPLATE\1033\Custom_Site_Template\LIST
contents of a
S
list
WEBTEMP.XML
A WEBTEMP.XML file contains the site definitions that are available on the Template
Selection page for creating instances of sites. WEBTEMP.XML defines the site template for a
site definition. By default, Windows SharePoint Services includes the following site templates:
Team Site, Blank Site, Document Workspace, and Meeting Workspace.
You can edit the default WEBTEMP.XML file to modify the existing list of templates available
to users. To hide a particular template on the list of site templates, locate the section for that
template in the WEBTEMP.XML file, and then set the Hidden attribute of the Configuration
element to TRUE. Set Hidden to FALSE to make the template visible.
Remember to copy and rename the WEBTEMP.XML file before making changes to the default
version. In the following example, we use the copied and renamed file
WEBTEMPTRAINING.XML to create a Training Team Site and a Trainee Workspace.
WEBTEMPTRAINING.XML
<?xml version="1.0" encoding="utf-8" ?>
<Templates xmlns:ows="Microsoft SharePoint">
<Template Name="TRAINING" ID="10101">
<Configuration ID="0" Title="Training Team Site" Type="0"
Hidden="FALSE"
ImageUrl="images/stsprev.jpg"
Description="This template provides a forum
for the team to create, organize, and share information
quickly and easily. It includes a document library, and
basic lists such as Announcements, Events, Contacts,
and Quick Links.">
</Configuration>
<Configuration ID="1" Title="Trainee Workspace" Type="0"
Hidden="FALSE"
ImageUrl="images/dwsprev.jpg"
Description="This definition creates a site for Trainees
to work together on specific documents.">
</Configuration>
</Template>
</Templates>
The WEBTEMPTRAINING.XML file contains a Template element used to define a single
template for a site. Each Template element has a Name attribute that must match the name of
the XML file prefixed with webtemp. For example, the value of the Name attribute (in this
example, training) is the same as the file name following the prefix of webtemp. During
initialization, Windows SharePoint Services scans for files with a prefix of webtemp*.xml and
loads them into memory.
Note For changes to appear, you must reset Internet Information Services (IIS) whenever
making changes to any of the WEBTEMP*.XML files.
A site definition only needs one root Template element. To avoid conflict with IDs already used
by Windows SharePoint Services, use unique values greater than 10,000 for the ID attribute.
The WEBTEMPTRAINING.XML file creates additional template options for selecting a new
template during site creation, as shown in Figure 1.
Figure 1. Training Workspace and Training Team Site templates are created (Click picture
to see larger image)
ONET.XML
The ONET.XML file defines the top link bar and the Quick Launch bar. It also specifies the
default document and list templates that are available for a Web Part Page such as document
library, picture library, custom list, discussion boards, surveys, and so on. The ONET.XML file
also specifies the configuration of files to include during site creation, and includes modules that
identify the location of these files during site creation.
Figure 2. Default options specified in the ONET.XML file (Click picture to see larger
image)
For detailed information, see "ONET.XML" in the Microsoft SharePoint Products and
Technologies 2003 Software Development Kit (SDK).
Customizing the Navigation Bar for a Site
You can customize the navigation bar of an existing site by adding a NavBarLink element to a
NavBar element within the ONET.XML file for a custom site template. You can add links to
local files and pages on the server or to files and pages located elsewhere.
The following example adds two NavBarLink elements, one that provides a link to a local file
on the server, called Sample.aspx, and the other that provides a link to a URL,
http://example.microsoft.com/.
<NavBars>
<NavBar Name="SharePoint Top Navbar" ID="1002">
<NavBarLink Name="Documents and Lists"
Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentCulture.LCID
%]/viewlsts.aspx">
</NavBarLink>
<NavBarLink Name="Create"
Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentCulture.LCID
%]/create.aspx">
</NavBarLink>
<NavBarLink Name="Site Settings"
Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentCulture.LCID
%]/settings.aspx">
</NavBarLink>
<NavBarLink Name="Get Current Data" Url="_layouts/Sample.aspx"></NavBarLink>
<NavBarLink Name="microsoft" Url="http://example.microsoft.com/"></NavBarLink>
<NavBarLink Name="Help" Url="javascript:HelpWindow()"></NavBarLink>
</NavBar>
<NavBar Name="Documents" ID="1004">
</NavBar>
<NavBar Name="Pictures" ID="1005">
</NavBar>
<NavBar Name="Lists" ID="1003">
</NavBar>
<NavBar Name="Discussions" ID="1006">
</NavBar>
<NavBar Name="Surveys" ID="1007">
</NavBar>
</NavBars>
The value of the Url attribute in the local link is relative to the top-level SharePoint site.
Using Site Configurations
When creating site definitions, the configuration identifies which lists and modules to include. A
configuration allows a site definition to have multiple options for site layout and design such as
Team Site, Blank Site, and Document Workspace. Each of these site templates result in a
different configuration of lists and Web Parts. Both WEBTEMP.XML and ONET.XML include
a Configuration element. In WEBTEMP.XML, this element is contained within the Template
element and specifies the configuration options to include for the site definition.
In ONET.XML, the Configuration element is contained within a Configurations element that
specifies one or more configurations containing lists and modules. Each Configuration element
contains an ID attribute. The ID attribute associates the configuration specified in a site template
with a configuration of list definitions in the ONET.XML file. The combination of this ID and
the value of the Name attribute in the Template element provides a reference to the contents of a
specific Configuration element in a ONET.XML file.
You can reuse existing list definitions specified in the ONET.XML file for a site definition. You
can also create multiple configurations in a single ONET.XML file. In this approach, each
configuration enables the creation of a site with a different set of lists, Web Parts, and layout.
Table 2. Configuration element attributes
Name Description
Optional Text. Contains the description of the site configuration that appears on
Description
the Template Selection page.
Optional Boolean. Specifies whether the site configuration appears as an option
Hidden
on the Template Selection page.
ID Required Integer. Specifies a unique ID for the configuration.
Optional Text. Contains the URL for the preview image displayed on the
ImageUrlURL
Template Selection page.
Name Optional Text. Contains the name of the configuration.
Optional Text. Contains the title of the configuration that is displayed on the
Title
Template Selection page.
Type Optional Text. Identifies the configuration with a specific site definition.
To set up a configuration within a site definition, use Configuration elements within a custom
WEBTEMP*.XML file and within one or more ONET.XML files that are referenced in the
WEBTEMP*.XML file.
For example, the WEBTEMPTRAINING.XML file in the previous example uses two
configurations to define different site configurations, one for a training team site and the other
for a training Document Workspace site. This example involves use of only two configurations
within a single site definition, but you can include multiple definitions with different
configurations within a single WEBTEMPTRAINING.XML file, each one referencing different
site definition directories and their respective ONET.XML files.
In the ONET.XML file, each configuration defines a specific type of site that can be created
from the site definition. All configurations within this file share a set of available list definitions,
document templates, navigation areas, base list types, and modules that are defined within the
file. You can add a reference to a list that is defined in ONET.XML by adding a List element to
the collection of lists specified within a Configuration element. For example, if you define a list
type named "My_Custom_List" in ONET.XML with a Type attribute of 143, then you can add
<List Title="My_Custom_List" Type="143" URL="Lists/My_Custom_List" /> to add the list to
the configuration. The following example shows the arrangement of configurations in the
ONET.XML file for a specific WEBTEMP*.XML file:
<Configurations>
<Configuration ID="0" Name="Default">
<Lists>
<List Title="My_Custom_List" Type="143" Url="Lists/My_Custom_List" />
<List Title="Shared Documents" Url="Shared Documents"
QuickLaunchUrl="Shared Documents/Forms/AllItems.aspx"
Type="101" />
<List Title="General Discussion" Url="Lists/General Discussion"
QuickLaunchUrl="Lists/General Discussion/AllItems.aspx"
Type="108" />
<List Title="Announcements" Type="104" Url="Lists/Announcements" />
<List Title="Links" Type="103" Url="Lists/Links" />
<List Title="Contacts" Url="Lists/Contacts"
QuickLaunchUrl="Lists/Contacts/AllItems.aspx" Type="105" />
<List Title="Events" Type="106" Url="Lists/Events" />
<List Title="Tasks" Url="Lists/Tasks" QuickLaunchUrl="Lists/Tasks/AllItems.aspx"
Type="107" />
<List Title="Site Template Catalog" Type="111" Url="_catalogs/wt"
RootWebOnly="TRUE" />
<List Title="Web Part Catalog" Type="113" Url="_catalogs/wp"
RootWebOnly="TRUE" />
<List Title="List Template Catalog" Type="114" Url="_catalogs/lt"
RootWebOnly="TRUE" />
</Lists>
<Modules>
<Module Name="Default"/>
<Module Name="WebPartPopulation"/>
</Modules>
</Configuration>
<Configuration ID="1" Name="DWS">
<Lists>
<List Title="Shared Documents" Type="101" />
<List Title="Image Library" Type="109" />
<List Title="General Discussion" Url="Lists/General Discussion"
QuickLaunchUrl="Lists/General Discussion/AllItems.aspx" Type="108" />
<List Title="Announcements" Type="104" Url="Lists/Announcements" />
<List Title="Contacts" Url="Lists/Contacts"
QuickLaunchUrl="Lists/Contacts/AllItems.aspx"
Type="105" />
<List Title="Links" Type="103" Url="Lists/Links" />
<List Title="Events" Url="Lists/Events" QuickLaunchUrl="Lists/Events/AllItems.aspx"
Type="106" />
<List Title="Tasks" Type="107" />
<List Title="Site Template Catalog" Type="111" Url="_catalogs/wt"
RootWebOnly="TRUE" />
<List Title="Web Part Catalog" Type="113" Url="_catalogs/wp"
RootWebOnly="TRUE" />
<List Title="List Template Catalog" Type="114" Url="_catalogs/lt"
RootWebOnly="TRUE" />
</Lists>
<Modules>
<Module Name="DWS"/>
<Module Name="WebPartPopulation"/>
</Modules>
</Configuration>
</Configurations>
Using Modules
Modules serve two purposes. Modules specify all the files associated with a definition and they
specify the location of these files in the new site. For example, if the file is a Web Part Page, the
module definition specifies both the Web Part Page file itself and the specific set of Web Parts or
lists, and files, to include on the page. The file is encapsulated inside the File element as a child
element of the module.
You must declare modules as an element within the Configuration element. You can also use
modules outside the configuration to define the URL of any file to include as part of the
definition.
The following is an example from the ONET.XML that shows the use of modules:
<Module Name="Default" Url="" Path="">
<File Url="default.aspx" NavBarHome="True">
<View List="104" BaseViewID="0" WebPartZoneID="Left"/>
<View List="106" BaseViewID="0" WebPartZoneID="Left"
WebPartOrder="2"/>
<AllUsersWebPart WebPartZoneID="Right"WebPartOrder="1">
<![CDATA[
<WebPart xmlns=http://schemas.microsoft.com/WebPart/v2
xmlns:iwp="http://schemas.microsoft.com/WebPart/v2/Image">
<Assembly>Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral,
PublicKeyToken=71e9bce111e9429c</Assembly>
<TypeName>Microsoft.SharePoint.WebPartPages.ImageWebPart
</TypeName>
<FrameType>None</FrameType>
<Title>Site Image</Title>
<iwp:ImageLink>/_layouts/images/homepage.gif
</iwp:ImageLink>
</WebPart>
]]>
</AllUsersWebPart>
<View List="103" BaseViewID="0" WebPartZoneID="Right"
WebPartOrder="2"/>
<NavBarPage Name="Home" ID="1002" Position="Start">
</NavBarPage>
<NavBarPage Name="Home" ID="0" Position="Start">
</NavBarPage>
</File>
</Module>
Note HTML definitions do not allow for nested
<CDATA>
tags. However to work around this, you can remove the inner tag and use
HtmlEncode
on its content.
The URL attribute is required and designates the main file to execute for the module. For
example, the URL could specify a Web Part Page such as default.aspx, or a *.dwp file for a
specific Web Part. Inside the Module element, you can include Web Part definitions and
placements inside a Web Part zone. The previous example specifies a single image Web Part
displayed in the right Web Part zone.
You can also specify whether to display a module in the top navigation area of a page as well as
placement in the Web Part zones of a page. In the previous example, views and Web Parts in the
module are displayed on the Home page. After a Web site is created, it includes whatever files
are specified through this module.
Field Definitions Using SCHEMA.XML
The SCHEMA.XML file defines the views, forms, and any special fields for a list. To customize
a list with custom views, you can modify the SCHEMA.XML file and add a field to the list
definition.
To add a field to a list definition
1. Go to the following directory:
2. Local_drive:\Program Files\Common Files\Microsoft Shared\Web Server
3. Extensions\60\TEMPLATE\1033\Custom_Site_Template\LISTS
Each subfolder represents a specific list.
4. Open the subfolder for the list you want to customize.
5. Open the SCHEMA.XML file using a text editor such as Notepad.
6. In the Metadata section of the file, find the Fields element that contains the definitions
of each field in the list type. You can add a new field under the Fields element as
follows:
7. <Field Name="EmployeeID" DisplayName="Employee ID"
Type="Number"Required="TRUE"
8. Description="Enter the ID from your employee badge."/>
For more information, see "Creating a List Definition" in the Microsoft SharePoint Products and
Technologies 2003 Software Development Kit (SDK).
Customizing the Toolbar for a List
To customize the toolbar for a list, you need to make changes to the Toolbar element within the
SCHEMA.XML file for the list. To add a new link to the toolbar, for example, you can copy an
existing definition for a link and then modify it. This maintains the nesting of tables that is used
for displaying links and ensures that the appearance of the link you add is consistent with the
other links.
The following example adds a link on the toolbar of a list to a document that is contained in the
Shared Documents folder.
<tr><td style="padding-left: 2px;padding-bottom: 2px" width=100%>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr><td width=100% class="ms-unselectednav" colspan=2>
<table cellpadding=0 cellspacing=0 border=0><tr><td valign=top>
<img src="../../_layouts/images/rect.gif"> </td>
<td><A HREF="]]></HTML><HttpVDir/>
<HTML><![CDATA[/Shared Documents/MeetingNotes.doc">]]></HTML>
<HTML>Type Conversions</HTML><HTML><![CDATA[</A></td></tr></table>
</td></tr></table>
</td></tr>
The example shows the toolbar link nested within three tables. The two tables in the example are
contained within opening and closing <tr> and <td> tags that belong to a third table, which
serves as the frame for containing all the links in the toolbar.
The CAML HttpVDir element, which returns the root directory of the current subsite, constructs
the complete path for the URL.
When a new list is created based on this template, a link to a MeetingNotes.doc file appears in
the toolbar.
Customizing Portal Areas Using Templates
You can select an area template to use when creating an area in SharePoint Portal Server. Area
templates are site definitions that also consist of multiple files with a parallel structure to the site
definitions in Windows SharePoint Services. They are stored in the following location:
Local_drive:\Program Files\Common Files\Microsoft Shared\Web server
extensions\60\template\1033
An area template can include:
• A site home page
• Lists for the site
• Document libraries
The default naming convention for area template directories starts with the prefix SPS. The
following table lists the template and the area it maps to.
Table 3. Area templates
Template Maps to
SPS Home
SPSBWEB To create bucket Web sites
SPSCOMMU Communities
SPSMSITE Site Registry
SPSNEWS Subareas under News
SPSNHOME News Home
SPSPERS MySite
SPSTOC Topics Home
SPSTOPIC Topic
To create area templates based on existing definitions
1. Copy and paste an area template folder (such as SPSCOMMU) and rename it, for
example, SPSMyTemplate.
Note The new template name must begin with SPS.
2. Leave the default WEBTEMPSPS.XML file, and create a new one, such as
WEBTEMPMySPS.xml, for the new template.
3. Optionally, you can create additional lists, either as described earlier in this article, or as
described in "Creating a List Definition" (Microsoft SharePoint Products and
Technologies 2003 Software Development Kit (SDK)).
4. In the new template folder, modify ONET.XML to add Web Parts and lists the same way
you modify a SharePoint site. You can also modify default.aspx to suit your needs.
5. Reset IIS to have the changes take effect. The new area template should appear in the
area template picker on the Create New Area page.
Specifying a Template for Subareas
When you change a template associated with an area, you can specify a template for its subarea.
To specify a template for a subarea
1. For any area you want to change, under Actions, click Manage Portal Site.
2. For the area of your choice, in the Edit drop-down list box, click Edit.
3. Click the Page tab. In the Subarea Templates section you can choose one of the
following:
○ Subareas can use any template (in the list of available area templates)
○ All subareas will use the following template (which you choose from the drop-
down list)
Template Inheritance
An area can inherit its template from its parent area, from a page, or from the original template
(see Figure 3).
To set a template for the current area
1. For any area you want to change, under Actions, click Manage Portal Site.
2. For the area of your choice, in the Edit drop-down list box, click Edit.
3. Click the Page tab. In the Area Templates section you can choose one of the following:
○ This area uses the same template as the parent area Use the parent template
to render this area.
Note The area uses the parent's template and the default SharePoint lists, but
portal listings are still sourced from the current area.
○ This area uses the template originally specified for this area Use the template
specified at area creation time to render the area. Picking this option reverts the
template to the one used when the area was created.
○ This area uses the following page as a template You provide any URL here
that you want. You can add the relative URL to another area to use that area's
template, for example, /topics/default.aspx. Or you can create your own page, and
provide the URL to that page. Regardless of what you type here, if the page used
has a Portal Listing Web Part on it, by default it uses the listing information from
the current area as its source.
Dino Dato-on
Jinger Zhao
Microsoft Corporation
May 2004
Applies to:
Microsoft® Windows® SharePoint™ Services
Microsoft Office SharePoint Portal Server 2003
Microsoft Office FrontPage® 2003
Summary: The third of three companion articles. In Customizing SharePoint Sites and Portals,
Part 1, you learned ways to customize a SharePoint site and an area; manage users, sites, and
templates; change the structure of pages in a site; manage user access; and optimize style sheets.
In Customizing SharePoint Sites and Portals: Using Templates and Site Definitions, Part 2, you
created and edited a site using templates and site definitions. Part 3 provides valuable style sheet
class reference tables to use as you customize your sites and portals. (39 printed pages)
Contents
Introduction
Table 1. Web Part Gallery Compatibility
Table 2. Style sheet Class References for OWS.CSS
Table 3. Style Sheet Class References for SPS.CSS
Conclusion
Introduction
Microsoft® SharePoint™ Products and Technologies consists of Microsoft Office SharePoint
Portal Server 2003 and Microsoft Windows® SharePoint Services. SharePoint Products and
Technologies uses Microsoft Windows Server™ 2003 and the .NET Framework. This latest
version offers improvements in the customization, development, and deployment of an enterprise
portal and team collaboration infrastructure.
Customization is the ability to change the layout, view, content, and site structure for a group of
users such as a department or corporation. To help ensure consistency, Windows SharePoint
Services and SharePoint Portal Server 2003 enable only Web Designers and Site Administrators
full customization privileges for managing the look and feel of a site.
In this article, you'll find Web Part compatibility and style sheet class reference tables to use in
your customization.
Table 1. Web Part Gallery Compatibility
Supported on Supported on other
Web Part name File name
portal sites SharePoint sites
Topic Assistant
Autocat.dwp Yes
Suggestions
Area Details Catdetail.dwp Yes
Group Listings GroupedListings.dwp Yes
News LatestNews.dwp Yes
Links for You LinksForYou.dwp Yes
Content Editor MSContentEditor.dwp Yes Yes
Image Web Part MSImage.dwp Yes Yes
Members MSMembers.dwp Yes
Page Viewer MSPageViewer.dwp Yes Yes
Form Web Part MSSimpleForm.dwp Yes Yes
XML Web Part MSXml.dwp Yes Yes
Your Recent
Mydocs.dwp Yes
Documents
My Workspace Sites Myworks.dwp Yes
News Areas NewsAreas.dwp Yes
News for You NewsForYou.dwp Yes
My Mail Folder Owa.dwp Yes
My Calendar Owacalendar.dwp Yes
My Inbox Owainbox.dwp Yes
My Tasks Owatasks.dwp Yes
My Links Quicklinks.dwp Yes
My Alerts Summary Subscrip.dwp Yes
Area Contents Toc.dwp Yes
Announcements Yes Yes
Contacts Yes Yes
Events Yes Yes
General Discussions Yes Yes
Links Yes Yes
Shared Documents Yes Yes
Tasks Yes Yes
My Checked-out Yes Yes
Pending Approvals Yes Yes
Document Library Yes Yes
Image Library Yes Yes
Table 2. Style sheet Class References for OWS.CSS
Selector What it controls Example
Sets margin of body or
body, form
form to 0
body Sets margin of body to 0
Determines color of border
.ms-main at right margin of each
page
.ms-toolbar,
Sets text and gradient in
table.ms-toolbar
list toolbars
.ms-rtetoolbarmenu,
.ms-rtetoolbarunsel,
.ms-rtetoolbarsel,
.ms-rtetoolbardis,
a.ms-rtetoolbardis,
Defines look of rich text
.ms-rtetoolbarhov
editor
Type of rating scale for
Survey lists, such as "Low,
.ms-gridT1
Medium, High" of a rating
scale question
.ms-viewselect a:link,
Text for available views in
.ms-GRFontSize
left navigation for a list
Text size in datasheet
control
hr Defines HR properties
Formats names of form
fields when creating or
.ms-formlabel
editing a list item or
adjusting site settings
Formats hyperlinks that
.ms-formdescription appear in form descriptions
A such as "Click here to
test"
.ms-formtable,
Text of each field in list
item; for example, form for
.ms-formbody
a "New Item" for any of
the default lists
Text in a survey when you
.ms-radiotext use option (radio) buttons
for the choice
Text of question on a
.ms-gridtext rating scale style question
in a Survey
Text of each field in a list
item; for example, the
.ms-formbody
form for a "New Item" for
any of the default lists
Defines font characteristics
.ms-formbody FONT
for the formbody class
Instruction text on form
.ms-formdescription
fields
Example: "Enter date
in M/D/YYYY
format" text when .ms-formdescription style
creating or editing a
new list item.
.ms-searchbox,
.ms-searchform,
Search form field on home
.ms-searchcorner
page
.ms-nav td,
.ms-nav,
.ms-SPZoneLabel,
"Select a View" text in a
.ms-input
list page
Input boxes for non- .ms-nav cell style
text (currency,
date/time, etc.)
Text in Quick Launch
.ms-nav th .ms-nav header cell style
area on home page
.ms-navheader a,
.ms-navheader a:link,
.ms-navheader Section headings on Quick
a:visited Launch bar
.ms-navframe,
Color behind Quick
.ms-GRStatusBar Launch bar and around
datasheet
.ms-storMeUsed,
Used on storage
.ms-storMeFilterBar
management page
Line dividing sections of
.ms-navline
left bar on list views
.ms-selectednav,
Box around selected view
on list view page; used for
.ms-GRSortFilter
a selected column in
datasheet
Unselected text on Quick
.ms-unselectednav
Launch bar
Graphical separator that
appears between main
.ms-verticaldots
body and left margin of
page (no longer used)
.ms-nav a
.ms-nav a:link
.ms-nav a:hover
Text in left navigation of
.ms-nav a:visited
the Quick Launch bar
Examples : The
words "Shared
Documents" "Tasks"
The site name that appears
on each page above the
.ms-titlearea .ms-titlearea style
page title (by default the
words "Team Web Site")
Upper portion of border at
TD.ms-titleareaframe
left margin of the page
Yellow line above title
Div.ms-titleareaframe
area of a page
.ms-titlearealine,
Yellow line below title and
above list toolbar; also
.ms-storMeEstimated
used on storage
management page
.ms-bodyareaframe Area below title
.ms-pagetitle Title text on each page .ms-pagetitle style
.ms-pagetitle a,
Hyperlinks that appear
.ms-pagetitle a:hover .ms-pagetitle hyperlink style
with title text
Caption above title for a
.ms-pagecaption
Web Part Page
.ms-selected,
Background of selected
items in Save or Save As
.ms-selected SPAN .ms-selected style
dialog box when saving to
a document library
Background on hover for a
.ms-selectedtitle
list item
Background for a list item
.ms-unselectedtitle
when not selected
Background color of arrow
.ms-menuimagecell next to item title for
context menu
List of selected shared
documents in Save or Save
.ms-filedialog td
As dialog box when saving
to a document library
Description text for a list,
.ms-descriptiontext description text on admin
forms and new list forms
.ms-vb a,
.ms-vb2 a,
.ms-GRStatusText a,
.ms-vb-user a,
.ms-vb a:hover,
.ms-vb2 a:hover,
.ms-vb-user a:hover
.ms-vb a:visited,
.ms-vb2 a:visited,
.ms-GRStatusText
a:visited,
.ms-vb-user a:visited
.ms-vb
a:visited:hover,
.ms-vb2
a:visited:hover,
.ms-vb-user
a:visited:hover,
.ms-vb2,
.ms-vb-title,
.ms-vb-icon,
.ms-vb-user,
.ms-vb-icon,
.ms-vb-user,
Text in body of a view and
.ms-vb2
most other common text
Icons classes are used
to indicate items such
as attachments
Title on home page of a
.ms-homepagetitle
Meeting Workspace
a.ms-addnew
"Add new..." text on
td.ms-addnew
summary view of lists
Error messages on form
.ms-error
submissions
Border type and font
.ms-cal formatting used in day
cells of Calendar view
.ms-calWeek,
.ms-vcal,
.ms-Dcal Used in Calendar view
Top border of each day
.ms-caltop .ms-caltop style
cell in Calendar view
.ms-calhead,
.ms-calhead a,
Header containing month
.ms-calhead a:hover name and navigation .ms-calhead style
arrows in Calendar view
Row of cells containing
.ms-caldow weekday names in .ms-caldow style
Calendar view
.ms-calmid Left and right borders on .ms-calmid style
each day cell in Calendar
view
Spacer used between
.ms-CalSpacer multiple appointments on .ms-calspacer style
same day
.ms-CalVSpacer Used in Calendar view
Calendar view all day
.ms-CalAllDay
events
Calendar view first row's
.ms-firstCalHour
TD containing time
Calendar view TD
.ms-calHour
containing time
Calendar view TD
.ms-calHalfHour containing half hour
marks
Calendar view TD between
.ms-calQuarterHour
hour and hour hour TDs
Calendar view horz day &
.ms-calbot
week, bottom row
.ms-appt a,
Hyperlink text of event
.ms-appt a:hover that spans multiple days in
Calendar view
.ms-appt,
Background, border and
text of event that spans
.ms-GRCellSelect .ms-appt style
multiple days in Calendar
view
Appointments displayed in
.ms-Dappt
"day view"
.ms-Vappt,
.ms-Vappt a,
.ms-Vappt a:link,
Appointments displayed in
.ms-Vappt a:hover
the vertical day view
Text of appointment that
.ms-apptsingle .ms-apptsingle
lasts a single day
Appointments displayed in
.ms-Dapptsingle "day view" with no
duration is set
.ms-Vapptsingle,
.ms-Vapptsingle a,
.ms-Vapptsingle
a:link,
Appointments displayed in
.ms-Vapptsingle
the "day view" with no
a:hover
duration is set
Down-level browser
.ms-caldowdown
support calendar table cell
Down-level browser
.ms-caldown support calendar day of
week
Position of date chooser
pop-up calendar when
.ms-datepickeriframe
creating or editing new list
item
Date chooser pop-up
.ms-datepicker calendar when creating or .ms-datepicker style
editing new list item
Line under weekday names
in date chooser pop-up
.ms-dpdow .ms-dpdow style
calendar when creating or
editing new list item
Text of date numerals in
the current month in the
.ms-dpday date chooser pop-up .ms-dpday style
calendar when creating or
editing a new list item
Text and background of
selected date in date
.ms-dpselectedday chooser pop-up calendar .ms-dpselectedday style
when creating or editing
new list item
Text of date numerals
which are not part of
current month in date
.ms-dpnonmonth .ms-dpnonmonth style
chooser pop-up calendar
when creating or editing
new list item
Header containing month
name and navigation
arrows in date chooser
.ms-dphead .ms-dphead style
pop-up calendar when
creating or editing new list
item
Arrows in date picker for
.ms-dpnextprev moving from one month to
next or previous
"Today's date" text and
line above it in date
.ms-dpfoot chooser pop-up calendar .ms-dpfoot style
when creating or editing
new list item
IMG.ms-button Sets cursor to hand for
buttons
.ms- Titles in Announcements
.ms-announcementtitle style
announcementtitle list view on home page
.ms-
List name in a list view
homepagetitle:Hover
Example : The words
"Announcements",
"Events", and "Links" .ms-homepagetitle style
on the default.htm
page
.ms- Space between discussion
discussionseparator threads
.ms-
summarytitlebarfram
e,
.ms-summarytitlebar
a:link,
.ms-summarytitlebar
a:visited,
.ms-summarytitlebar,
.ms-
summarytitlebartitle,
.ms-
summarytitlebartitle: Unused
hover
tr.ms-
imglibselectedrow,
Color of a row in an image
library when it is selected;
tr.ms-highlight
used in selected pictures
view
Background for thumbnails
in thumbnails view; border
.ms-imglibthumbnail
color should be same with
img.thumbnail above
span.thumbnail,
span.userdata Internal usage; do not alter
Background of previous
.ms-imglibmenuarea and next command in
filmstrip view
a.ms-
imglibPreviewTitle,
table.ms-
Internal usage; do not alter
imglibPreviewTable
Shaded areas inside Web
.UserShadedRegion
Parts
Text areas inside Web
.UserCaption
Parts
Text areas inside Web
.UserConfiguration
Parts
.UserDottedLine Dotted line in Web Parts
.UserButton,
.UserInput,
.UserSelect Input boxes in Web Parts
Text areas inside Web
.UserNotification
Parts
.
Spacing for elements on a
UserToolBarTextAre
toolbar inside Web Parts
a
.
UserToolBarTextAre
a a: link,
.
UserToolBarTextAre
a a: visited,
.
UserToolBarTextAre
a a: hover,
.
UserToolbarDisabled
Link,
.UserToolbarImage,
.
UserToolBarImageAr
ea,
.
Elements in a toolbar in a
UserToolbarSelectedI
Web Part
mage
Header text inside Web
.UserGenericHeader
Parts
Default text inside Web
.UserGeneric
Parts
Indented body text inside
.UserGenericBody
Web Parts
Generic text to be used in
.UserGenericText
all Web Parts
Background area inside
.UserBackground
Web Parts
Form title inside Web
.UserSectionTitle
Parts
Control labels inside Web
.UserSectionHead
Parts
Instructional text on a
.UserSectionBody
control inside a Web Part
Area of a form control
.UserControlGroup
inside Web Parts
Area at bottom of user
.UserSectionFooter form containing dotted line
and command buttons
.UserFooter Area at bottom of a form
Command button area at
.UserCommandArea
bottom of user form
.UserToolbar Toolbar inside Web Parts
A selected cell in a Web
.UserCellSelected
Part
.UserCell A cell in a Web Part
.
A bulleted item in a Web
UserGenericBulletIte
Part
m
Background of Web Part
.ms-ToolPaneFrame
tool pane interior
Body of Web Part tool
.ms-ToolPaneBody
pane
Border around Web Part
.ms-ToolPaneBorder
tool pane
Header of Web Part tool
.ms-ToolPaneHeader
pane
Area around "x" button to
.ms-ToolPaneClose
close tool pane
.ms-ToolPaneTitle Title of tool pane
.ms-ToolPaneFooter Footer area of tool pane
Error messages that show
.ms-ToolPaneError
up in tool pane
Information messages that
.ms-ToolPaneInfo
show up in tool pane
.ms-ToolPartSpacing Spacing between parts
Hover treatment for
.ms-
toolstrip at top of Web Part
ToolStripSelected
tool pane
Toolstrip at top of Web
.ms-ToolStrip
Part tool pane
Header of Web Part tool
.ms-TPHeader
pane
Border of Web Part tool
.ms-TPBorder
pane
Title of Web Part tool
.ms-TPTitle
pane
.ms-TPBody,
.ms-TPBody A:link,
.ms-TPBody
A:visited,
Body of Web Part tool
.ms-TPBody A:hover
pane
Commands on Web Part
.ms-TPCommands
tool pane
Commands on Web Part
.ms-TPInput
tool pane
.ms-
Class used for "..." buttons
PropGridBuilderButt
in Web Part tool pane
on
Background of a dialog
.ms-
box spawned from Web
BuilderBackground
Part property sheet
.ms-SPZone Borders of a zone control
Borders of a zone control
.ms-SPZoneSelected when insertion bar is active
inside it
The insertion bar which
.ms-SPZoneIBar shows which zone the user
is dragging a part into
.ms-SPZoneLabel Label on a zone
Caption of text inside a
.ms-SPZoneCaption
zone
Background in a Web Part
.ms-WPDesign
design mode
.ms-WPMenu Area around menu
.ms-WPTitle,
.ms-WPTitle A:link,
.ms-WPTitle
A:visited,
.ms-WPTitle A:hover Title of a Web Part sample text
Border around Web Part
.ms-WPSelected
when it is selected
.ms-WPBody,
.ms-WPBody
TABLE,
.ms-TPBody TABLE,
.ms-WPBody A:link,
.ms-WPBody
A:visited,
.ms-WPBody
A:hover,
.ms-WPBody th,
.ms-TPBody th
.ms-WPBody TD,
.ms-WPBody h1,
.ms-TPBody h1,
.ms-WPBody h2,
.ms-TPBody h2,
.ms-WPBody h3,
.ms-TPBody h3,
.ms-WPBody h4,
.ms-TPBody h4,
.ms-WPBody h5,
.ms-TPBody h5,
.ms-WPBody h6,
.ms-TPBody h6 Contents of a Web Part
.ms-WPBorder Border around a Web Part
.ms-HoverCellActive,
.ms-
HoverCellInActive,
.ms- Cell treatment on Hover
HoverCellActiveDark throughout UI
.ms-SPLink,
.ms-SPLink A:link,
.ms-SPLink A:visited "Modify Page" link
.ms-SPButton Font for buttons
.ms- Vertical spacing between
PartSpacingVertical Web Parts
.ms-
Horizontal spacing
PartSpacingHorizonta
between Web Parts
l
Background area of a Web
.ms-WPHeader
Part title bar
.ms-
rtApplyBackground,
.ms-
tbButtonMouseOver
Down,
.ms-
Rich text editor classes
rtRemoveBackground
Subscriptions: Used for
"Frequency: Immediate"
.ms-
etc. section headers on
subsmanageheader
MySubs.aspx /
SiteSubs.aspx
Used for each subscription
.ms-subsmanagecell
row
Error messages when
.ms-ConnError
authoring connections
Vertical bars in a
chart for rating
questions
Survey Graphical
.ms-surveyTotal
Summary View
Spacers between
vertical bars in chart
for ratings questions
.ms-
MWSSelectedInstanc
e,
.ms-MWSInstantiated
a:link,
.ms-MWSInstantiated
a:visited,
.ms-MWSInstantiated
a:hover
.ms-
MWSUninstantiated
a:link,
.ms-
MWSUninstantiated
a:visited,
Table cell
containing one
.ms-menuUIItemTableCell <td>
SPS ECB menu
item
SPS ECB menu
.ms-MenuUIItemTable <table>
item
Icon cell of one
.ms-MenuUIIcon SPS ECB menu <td>
item
.ms-MenuUILabel,
Label cell of one
.ms-MenuUILabelFont SPS ECB menu <td>
item
Table that
.ms-main contains entire <table>
portal page
Table that
contains the top
.ms-bannerframe <table>
banner portion
of the page.
Right table cell
.ms-banner <td>
of top banner
Wrapper over
.ms-phnav1wrapper horizontal <div>
navigation bar
Wrapper over
horizontal
navigation bar <div>,
.ms-navframe
or outer table of <table>
vertical
navigation bar
Outer table of
.ms-phnavtableone horizontal <table>
navigation bar
An area in
horizontal
navigation bar.
Note: (Sel) is
optional, only
appears as suffix
if area is
selected. [n] ==
.ms-phnavtableone[n](Sel) <table>
0 denotes
anchor area and
(as in Home) [n]
== 1 denotes
sub-areas of the
anchor area (as
in Topics and
News).
Top left of an
area in
.ms-phnavtopl[n](Sel) <td>
horizontal
navigation bar
Top center of an
area in
.ms-phnavtopc[n](Sel) <td>
horizontal
navigation bar
Top right of an
area in
.ms-phnavtopr[n](Sel) <td>
horizontal
navigation bar
Middle left of an
area in the
.ms-phnavmidl[n](Sel) <td>
horizontal
navigation bar
Middle center of
an area in the
.ms-phnavmidc[n](Sel) <td>
horizontal
navigation bar
Middle right of
an area in
.ms-phnavmidr[n](Sel) <td>
horizontal
navigation bar
Bottom left of
an area in
.ms-phnavbotl[n](Sel) <td>
horizontal
navigation bar
Bottom center
of an area in
.ms-phnavbotc[n](Sel) <td>
horizontal
navigation bar
Bottom right of
an area in
.ms-phnavbotr[n](Sel) <td>
horizontal
navigation bar
Middle section
of page that <td>,
.ms-titleareaframe includes page <div>,
icon, page title, <table>
and search box
Table cell
.ms-titlearea containing <td>
portal title
Table cell
.ms-pagetitle containing page <td>
title
.ms-sbrow Search box <tr>
.ms-sbtable,
Applied to table
.ms-searchform cells of search <td>
box
Applies the
corner gif to the
.ms-sbtopcorner <td>
top left corner of
the search box
Applies
corner .gif to
.ms-sblbcorner bottom-left <td>
corner of search
box
Search button
.ms-sbgo <td>
table cell
Horizontal line
.ms-titlearealine underneath title <td>
area
Grey section
running down
left side of page
.ms-navframe that contains <table>
navigation
elements and
action bar
Container for
.ms-nav ms-navframe <td>
table
Table cell that
contains
Microsoft Office
.ms-navwatermark Sharepoint <td>
Portal Server
watermark on
home page
Vertical
.ms-pvnav <table>
navigation bar
Title of vertical
.ms-navheader <td>
navigation bar
An area in the
.ms-pvnavtableone1 vertical
navigation bar.
Top left of an
.ms-pvnavtopl1 area in vertical <td>
navigation bar
Top center of an
.ms-pvnavtopc1 area in vertical <td>
navigation bar
Top right of an
.ms-pvnavtopr1 area in vertical <td>
navigation bar
Middle left of an
.ms-pvnavmidl1 area in vertical <td>
navigation bar
Middle center of
an area in
.ms-pvnavmidc1 <td>
vertical
navigation bar
Middle right of
an area in
.ms-pvnavmidr1 <td>
vertical
navigation bar
Bottom left of
an area in
.ms-pvnavbotl1 <td>
vertical
navigation bar
.ms-pvnavbotc1 Bottom center <td>
of an area in
vertical
navigation bar
Bottom right of
an area in
.ms-pvnavbotr1 <td>
vertical
navigation bar
Vertical toolbar
.ms-pvtbt title and toolbar <td> Title and separator:
separator
Separator alone:
Table cell
containing
.ms-pvtbicon <td>
vertical toolbar
button icon
Table cell
containing
.ms-pvtbbutton <td>
vertical toolbar
button text
Main content
.ms-bodyareaframe <td>
section of page
Table used for
layout of Web
.ms-tztable Part zones on <table>
portal area
pages
Top table cell of
.ms-tztop Web Part layout <td>
table
Middle left table
.ms-tzmidleft cell of Web Part <td>
layout table
Middle right
table cell of the
.ms-tzmidright <td>
Web Part layout
table
Wrapper of
.ms-tzmrdiv content in <div>
middle right cell
Wrapper of
content in
.ms-srchtzmrdiv middle right cell <div>
on search.aspx
page
Bottom table
.ms-tzbottom cell of Web Part <td>
layout table
One listing
group inside
.ms-ls <table>
Area Listing
Web Part
Text of listing
group title in
Area Listing
.ms-portaltitle Web Part or <td> Listing group title:
Title of Table of
Contents Web
Part
Icon cell of a
.ms-lstopitemicon Listing item in <td>
Topic Item view
Title cell of a
.ms-lstopitemlink Listing item in <td>
Topic Item view
.ms-lstopitemdesc Description cell <td>
of a Listing item
in Topic Item
view
Title cell of a
Listing item in
.ms-lsmin <td>
Minimum and
Compact view
Title and
description cell
.ms-lsnorm <td>
of a Listing item
in Normal view
Image cell, title
and description
.ms-lsexp cell of a Listing <td>
item in
Expanded view
Tile of a Listing
.ms-lstitle item in <a>
Expanded view
Tile of the Area
.ms-lswptitle Listing Web <td>
Part
Vertical
.ms-location breadcrumb trail <table>
Web Part
Vertical
.ms-locationhead breadcrumb trail <td>
title
Table cell
containing
.ms-locationicon(sel) vertical <td>
breadcrumb trail
icon
Table cell
containing
.ms-locationbutton(sel) vertical <td>
breadcrumb trail
button text
Horizontal
.bc-htable breadcrumb trail <table>
Web Part
.bc-cell Table cell <td>
containing
content of
horizontal
breadcrumb trail
Web Part
Lead-in text part
of horizontal
.bc-leadin <span>
breadcrumb trail
Web Part
Trail text part of
horizontal
.bc-trail <span>
breadcrumb trail
Web Part
Area Details
.ms-catdesc <table>
Web Part
Image and
.ms-catindent ndentation <td>
column
Title of child
.ms-toccattitle <td>
area
.ms-catsectionline Section line <td>
under child area
title
Description cell
.ms-toccatitem <td>
of child area
Contains
subareas and
.ms-tocitems <td>
listings of child
areas
Contains listings
of child areas;
HTML
container is
.ms-catlsts <span> in Table <span>
of Contents in
horizontal mode
and <table> in
vertical mode
<table> Horizontal:
Vertical:
Contains
subareas of
child areas;
HTML
container is
<span> in
.ms-catsubcats Table of <span>
Contents in
horizontal
mode and
<table> in
vertical
mode
<table> Horizontal:
Vertical:
Page icon
on site
.ms-pageidi <td>
admin
pages
Vertical
.ms-colspace <td>
spacer
Page
identificatio
.ms-pageidtapt n section of <table>
site admin
pages
Breadcrum
b trail cell
.ms-pageidta on site <td>
admin
pages
Page title
on site
.ms-pageidpt <td>
admin
pages
View
.ms-view <table>
selector
View
.ms-viewhead selector <td>
title
Icon cell for
one view in
.ms-viewicon(sel) <td>
view
selector
Text cell
for one
.ms-button(sel) view in <td>
view
selector
.ms-formspacer Space <td>
padding on
site admin
page forms
Title of
item in
.ms-srchTitle <td>
search
result
Sets
vertical
alignment
for table
.ms-srchAlignTop <td>
cells in
search
result to
Top
Cell
displaying
full URL of
.ms-srchUrl <td>
item in
search
result
Cell
displaying
possible
.ms-srchActions <td>
actions on
search
result item
Conclusion
This article concludes the Customizing SharePoint Sites and Portals series. For more information
see Customizing SharePoint Sites and Portals, Part 1 and Customizing SharePoint Sites and
Portals: Using Templates and Site Definitions, Part 2.
Additional References