Ever create custom site definitions?

This article contains information about custom site definitions in Microsoft Windows SharePoint Services and custom area definitions in Microsoft Office SharePoint Portal Server 2003. This article lists scenarios that are supported and scenarios that are not supported when you customize site definitions and area definitions.

Supported method of creating site definition

You can create a site definition by copying and modifying an existing site definition. This task involves use of Collaborative Application Markup Language (CAML) in two schema files: one that is a copy of a WEBTEMP.XML file, and the other a copy of an ONET.XML file. It is required that you create a site definition as described in this topic rather than modifying the originally installed WEBTEMP.XML file.

  • Copy the existing site definition folder located in the Local_Drive:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions60Template1033 directory.For example, to create a custom site definition that derives from the site definition for Microsoft Windows SharePoint Services, copy the STS folder located in the 1033 directory. Name the new folder using all capital letters.
  • Make a copy of the WEBTEMP.XML file located at Local_Drive:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions60TEMPLATE1033XML.Give the file a unique name by appending a string to the name of the original file; for example, WEBTEMPACTION.XML. At run time, the compiler merges information contained in this file with the information contained in the original file in order to specify which site templates are available for creating new sites.
  • Customize the contents of the new WEBTEMP file.Each WEBTEMP.XML file contains a collection of Template elements and Configuration subelements, which identify to the compiler all the site definitions that can be instantiated. The Configuration element defines a title, a description, and a URL for the image displayed in the user interface, properties common to each Web site created using the site definition.Important  In each Template element defined in the WEBTEMP file, the Name attribute must contain the same name, in all capital letters, that is assigned to the new folder. Also, in order to avoid conflict with IDs already used in Windows SharePoint Services, use unique values greater than 10,000 for the ID attribute.

    The following example defines a single site definition. The example assumes the existence of an ACTIONCOMMITTEE directory that has been created as previously described.

  • Save the file.
  • You may need to reset Internet Information Services (IIS) for the new template to appear as an option on the Template Selection page.