0 out of 5 rated this helpful - Rate this topic

Configuration Element (Site)

Windows SharePoint Services 3

Specifies the lists and modules used in creating a SharePoint Web site that is based on the site definition configuration represented by the Configuration element.

Note Note:

In this topic, "the UI of Windows SharePoint Services" refers to the Template Selection section of the New SharePoint Site page in Windows SharePoint Services 3.0.


<Configuration
    AllowGlobalFeatureAssociations = "TRUE" | "FALSE"
    CustomMasterUrl = "Text"
    Description = "Text"
    DisplayCategory = "Text"
    FilterCategories = "Text"
    Hidden = "TRUE" | "FALSE"
    ID = "Integer"
    ImageUrl = "Text"
    MasterUrl = "Text"
    Name = "Text"
    ProvisionAssembly = "Text"
    ProvisionClass = "Text"
    ProvisionData = "Text"
    RootWebOnly = "TRUE" | "FALSE"
    SubWebOnly = "TRUE" | "FALSE"
    Title = "Text"
    Type = "Text"
    VisibilityFeatureDependency = "Text">
</Configuration>
AttributeDescription

AllowGlobalFeatureAssociations

Optional Boolean. Specifies whether global Feature associations are allowed for sites that are created with the site definition configuration.

CustomMasterUrl

Optional Text. Specifies the URL for an alternate .master page that can be used on pages, in Web sites that are created through the site definition configuration, without unghosting those pages.

NoteNote:
Simply changing the value of the MasterPageFile attribute on pages that need an alternate master page, would unghost those pages.

For more information on how the value of the CustomMasterUrl is used, see Customizing Master Pages in Windows SharePoint Services.

Description

Optional Text. Contains the locale-specific description of the site definition configuration that appears in the UI of Windows SharePoint Services.

DisplayCategory

Optional Text. Specifies the tab on which the site definition configuration will appear in the UI of Windows SharePoint Services, for example, Collaboration, Meetings, or some custom name. (Only custom custom site templates appear in the tab that is actually named Custom, not site definition configurations unless "Custom" is the chosen custom name, which Microsoft does not recommend: having all and only site templates on one tab makes it easy to distinguish them in the UI from definition configurations. This can be helpful in troubleshooting.)

FilterCategories

Optional Text. This attribute is not used by Windows SharePoint Services. It is available for enhanced portal or content management solutions built on Windows SharePoint Services, such as Office SharePoint Server 2007, to use as means of categorizing site configurations in ways that do not map precisely onto the categorizations that appear as tab labels in the UI. (See also the DisplayCategory attribute.)

Hidden

Optional Boolean. Specifies whether the site definition configuration appears as an option in the UI of Windows SharePoint Services.

ID

Required Integer. Specifies an ID for the site definition configuration that is unique within the site definition. A definition, such as STS or MPS, is defined by a Template element in a WebTemp*.xml file and by a corresponding Onet.xml file for the definition. See Parent Elements and Remarks below.

ImageUrl

Required Text. Contains the URL for the preview image displayed in the UI of Windows SharePoint Services.

MasterUrl

Optional Text. Specifies the default master page to use for Web sites created through the site definition configuration.

Name

Optional Text. Contains the name of the site definition configuration.

ProvisionAssembly

Optional Text. Specifies the name of the assembly that contains the provision class, if there is one. (See ProvisionClass below.) For example:

ProvisionAssembly="MyCompany.SharePoint.ProvisionHelper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=82f0cdf222f0530d"

ProvisionClass

Optional Text. Specifies the fully qualified name of a class that provides provisioning functionality that will execute when the runtime finishes creating a site from the configuration. It is not required that there be such a class, but if you need one for a custom configuration, it must derive from SPWebProvisioningProvider. For example:

ProvisionClass="MyCompany.SharePoint. ProvisionHelper.MySiteProvisioningProvider"

ProvisionData

Optional Text. Specifies data that will be used by the Provision method of the ProvisionClass (see above). This can be a path to file that contains structured data. For example:

ProvisionData="SiteTemplates\\MySiteManifest.xml"

RootWebOnly

Optional Boolean. TRUE to specify that the site created from the configuration exists only as the root Web site in a site collection. This attribute is not enforced in site templates (.stp files).

SubWebOnly

Optional Boolean. TRUE to specify that the site created from the configuration exists only as a subsite within a site collection. This attribute is not enforced in site templates (.stp files).

Title

Optional Text. Contains the title of the site definition configuration that is displayed on a tab in the UI of Windows SharePoint Services.

Type

Optional Text. Identifies the site definition, such as STS or MPS.

VisibilityFeatureDependency

Optional Text. Used in a WebTemp*.xml file to hide the site definition configuration based on the activation state of the specified Feature. When a configuration contains Features that depend upon another Feature, setting this attribute prevents the configuration from appearing as an option in the UI of Windows SharePoint Services if the specified Feature is not installed or activated. This attribute is not supported for Features with Web application scope.

Minimum: 0

Maximum: Unbounded

A Configuration element is used in WebTemp*.xml files (see WebTemp.xml) to identify an available site definition configuration within a site definition. It is used in Onet.xml files to define a configuration of lists, modules, and features that are used to create a site from the site definition configuration. In a WebTemp*.xml file, this element is contained within a Template element that specifies the site definition. In Onet.xml, this element is contained within a Configurations element that specifies the configurations whose lists are defined within the Onet.xml.

There is one Template element in a WebTemp*.xml file and one Onet.xml file for each site definition.

The ID attribute associates the Configuration element for a given site definition in a WebTemp*.xml file with the corresponding Configuration element for that same site definition in the Onet.xml.

A site template, as distinct from a site definition configuration, is not defined with a Configuration element. It is defined with a manifest.xml file inside .stp files that is stored in the SharePoint database.

The following example from WebTemp.xml specifies the three configurations for the STS Web site definition.

<Template Name="STS" ID="1">
  <Configuration ID="0" Title="Team Site" Hidden="FALSE" ImageUrl="/_layouts/images/stsprev.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="1" Title="Blank Site" Hidden="FALSE" ImageUrl="/_layouts/images/blankprev.png" Description="A blank site for you to customize based on your requirements." DisplayCategory="Collaboration" AllowGlobalFeatureAssociations="False" ></Configuration>
  <Configuration ID="2" Title="Document Workspace" Hidden="FALSE" ImageUrl="/_layouts/images/dwsprev.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>
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
ImageUrl is not Optional

At least as of SP1, ImageUrl is not optional. Maybe it wasn't optional before SP1, but I didn't check that.

If you leave the ImageUrl out, you'll get the following exception in the "Choose Template" page or if you're creating a site/web based on the template with STSADM :

"Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))".

Microsoft: Thanks, Mark. This is now fixed.

FilterCategories missing
The FilterCategories element is used in out of the box files but not used here. See webtempsps.xml.


Microsoft: Thanks for pointing that out, Alex. This will be corrected the next time this MSDN topic is republished. In the meantime, here is the documentation for the FilterCategories attribute:

FilterCategories - Optional Text. This attribute is not used by Windows SharePoint Services. It is available for enhanced portal or content management solutions built on Windows SharePoint Services, such as Office SharePoint Server 2007, to use as means of categorizing site configurations in ways that do not map precisely onto the categorizations that appear as tab labels in the UI. (See also the DisplayCategory attribute.)

RootWebOnly = True
I think RootWebOnly attribute above can be explained a little bit further. If you like to create a site definition that is only used to create top level sites , in the Configuration element of WebTemp*.xml , you specify RootWebOnly = "True ". This ensures that your site definition is only used for creating top-level sites which also means it's only available in Central Administration site where you create the site collections.

Reza Alirezaei, MVP
Blog: http://blogs.devhorizon.com/reza