Understanding WebTemp*.xml Files
Published: May 2010
Each server in a deployment of Microsoft SharePoint Foundation has at least the originally installed WebTemp.xml file located in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LCID\XML folder, where LCID is the numeric ID of the language/culture, such as 1033 for English. There may also be one or more custom WebTemp*.xml files. The WebTemp*.xml files contain an itemization of the site definition configurations that are available in the user interface (UI) for users to select when they create a new website. The UI varies depending on whether the Microsoft Silverlight or HTML site creation page is being used.
You must not modify the original WebTemp.xml file that is installed with SharePoint Foundation. Changes that you make to originally installed files may be overwritten when you install updates or service packs to SharePoint Foundation, or when you upgrade an installation to the next product version. For these reasons, changing the original WebTemp.xml file is not supported. For more information about creating a custom site definition, see How to: Create a Custom Site Definition and Configuration.
The Templates element specifies the site definitions that are being made available in the WebTemp*.xml file. Each site definition is defined with a Template element. Each site definition has one or more site definition configurations that can be used to instantiate sites. Each Template element specifies a unique ID and a name that corresponds to a site definition subfolder within the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates folder.
A Template element can contain any number of Configuration child elements. Each such child represents a site definition configuration. The ID attribute of each Configuration element corresponds to the ID of another Configuration element that is in an Onet.xml file. The second Configuration element specifies the lists and modules of the site definition configuration.
Each Configuration element in a WebTemp*.xml file also specifies the title and description (and the path to the image) of the configuration that is displayed in the SharePoint Foundation UI when a user is creating a new site. A configuration can be hidden from the UI by setting its Hidden attribute to TRUE.
The DisplayCategory attribute of a Configuration element in a WebTemp*.xml file specifies the category of site type that the site appears under in the UI; for example, "Collaboration" and "Meetings". (In the Silverlight version of the UI for creating a new site, some built-in site types do not appear in the category that corresponds to their DisplayCategory value.) If you are creating a custom site definition configuration and specify a previously unused value for DisplayCategory, a new category with that name appears in the UI to contain your custom site definition configuration.
The SupportsMultilingualUI attribute of a Configuration element indicates whether sites that were created from the site definition configuration can have different UIs for different languages.
The following excerpt from the built-in WebTemp.xml file shows the format of the markup.
<Templates xmlns:ows="Microsoft SharePoint"> <Template Name="STS" ID="1"> <Configuration ID="0" Title="Team Site" Hidden="FALSE" ImageUrl="/_layouts/images/stts.png" Description="A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions." DisplayCategory="Collaboration" > </Configuration> ... <Configuration ID="2" Title="Document Workspace" Hidden="FALSE" ImageUrl="/_layouts/images/stdw.png" Description="A site for colleagues to work together on a document. It provides a document library for storing the primary document and supporting files, a tasks list for assigning to-do items, and a links list for resources related to the document." DisplayCategory="Collaboration" > </Configuration> </Template> <Configuration ID="0" Title="Basic Meeting Workspace" Hidden="FALSE" ImageUrl="/_layouts/images/stmw.png" Description="A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda, meeting attendees, and documents." DisplayCategory="Meetings" SupportsMultilingualUI="FALSE" > </Configuration> ... </Template> </Templates>
For information about creating a custom definition configuration, see How to: Create a Custom Site Definition and Configuration.