Condividi tramite


Site Definitions and Configurations

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

A site definition defines a unique type of SharePoint site. There are five site definitions natively installed in Windows SharePoint Services. A site definition can include more than one site definition configuration. SharePoint Web sites are based on particular site defnition configurations.

  • STS includes the site definition configurations for Team Site, Blank Site, and Document Workspace.

  • MPS includes the site definition configurations for Basic Meeting Workspace, Blank Meeting Workspace, Decision Meeting Workspace, Social Meeting Workspace, and Multipage Meeting Workspace.

  • CENTRALADMIN provides a site definition configuration sfor central administration Web sites.

  • WIKI provides a site definition configuration for Web sites that support community content using wiki technology.

  • BLOG provides a site definition configuration for blogs.

Each site definition consists of a combination of files that are placed in the \\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE subfolders of front-end Web servers during installation of Windows SharePoint Services. Site definition files include .xml, .aspx, .ascx, and .master page files, as well as document template files (.dot, .htm, and so on), and content files (.gif, .doc, and so on).

Ghosting and Page Customization

Site definition files are cached in memory on the server at process startup of Microsoft Internet Information Services (IIS), which improves scalability and performance by reducing unnecessary data storage or retrieval, and by allowing uncustomized pages to be reused across sites. The information contained in these files is pulled from the cache at run time. Pages and list schemas are read from the site definition files but appear to be actual files within a site, which is why these files are referred to as "ghosted." Ghosted pages are therefore pages whose actual content does not reside in the database but on disk. A row for each page is in the database and it contains a column value that points to the source for the page in the file system. New Web Part pages are also ghosted.

When site pages are customized, excluding browser-based customizations such as modifications to Web Parts, the pages become "unghosted" and their contents are stored in the database. Uploaded .aspx files are considered unghosted automatically. The contents of unghosted pages are routed through safe mode parsing in ASP.NET, which prevents server-side code from executing, and which depends entirely on the Safe Controls list — specified in the web.config file of the Windows SharePoint Services application's subfolder in C:\Inetpub\wwwroot\wss\VirtualDirectories — to determine which controls can be rendered at run time.

Core Schema Files

The following table describes prominent XML files that can be modified for a site definition and shows their locations in the file system.

DocIcon.xml

WebTemp.xml

Onet.xml

Schema.xml

Maps file ProgIDs and file extensions of document types to specific icons and to controls for opening each type.

Identifies the site definitions and provides information about how their configurations will appear in the Template Selection section of the New SharePoint Site page.

Defines the navigation areas, specifies the list definitions available on the Create page, specifies document templates and their files, defines the base types for lists, and defines configurations and modules for site definitions.

Defines the views, forms, toolbar, and special fields in a list definition. Each definition has its own Schema.xml file.

\TEMPLATE\XML

\TEMPLATE\1033\XML

\TEMPLATE\SiteDefinitions\site_type\XML

\TEMPLATE\FEATURES\List_Definition_Name

Each of these XML files uses Collaborative Application Markup Language (CAML) as the conveyor for defining various aspects of a site, but three of them stand out in relation to customizing site definitions: WebTemp.xml, Onet.xml, and Schema.xml.

WebTemp.xml specifies which site definition configurations are available for creating sites. If you are creating a custom site definition, do not edit the original WebTemp.xml file. Instead, create a custom WebTemp*.XML file as described in How to: Create a Custom Site Definition and Configuration. Windows SharePoint Services merges the contents of all files that match WebTemp*.XML when showing available site definition configurations on the New SharePoint Site page. This simplifies installing and uninstalling site definitions, because their contents do not need to be merged into one WebTemp.xml file.

Note

There is one exception to the rule that you should not modify the original original WebTemp.xml file. You may set the Hidden attribute of a Configuration element to TRUE if you want to make the site definition configuration unavailable on the Template Selection section of the New SharePoint Site page. You will have to repeat this if a repair or service pack overwrites the WebTemp.xml file.

Onet.xml defines the top navigation and Quick Launch areas, specifies which list types are available on the Create page, specifies document templates and their file types, and defines the base types for lists, which include Generic List, Document Library, Discussion Forum, Vote or Survey, and Issues List. In addition, Onet.xml uses Configuration elements to define the site definition configurations in a site definition (such as STS and BLOG) and Module elements to define the modules in each site defnition configuration.

A Configuration specifies the set of lists and modules that are included when a site is created, and a Module specifies the file or files to include during site creation and the location in which they are stored. For more information about site definition configurations, see How to: Use Site Definition Configurations. For more information about modules, see How to: Provision a File.

Schema.xml defines the views, forms, toolbar, and any special fields for a list type. For an example that shows how to create a custom list definition, see How to: Create a Custom List Definition.

For more information about the schema files used in a Windows SharePoint Services deployment, see Major Schema Definition Files.

Warning

For the following reasons, you must create a new site definition rather than modify an originally installed site definition: (1) use of repairs and service packs could revert your modifications, (2) custom templates based on the original site definitions may not work, and (3) site definitions with references to original list definitions may not work.

See Also

Tasks

How to: Use Site Definition Configurations

Reference

Configuration

Major Schema Definition Files

Module

Concepts

How to: Create a Custom List Definition

How to: Provision a File

Onet.xml

Schema.xml

WebTemp.xml

Other Resources

Collaborative Application Markup Language (CAML)