Microsoft KB Archive/825217

= Overview of custom templates in SharePoint Portal Server 2003 and in Windows SharePoint Services =

Article ID: 825217

Article Last Modified on 12/18/2006

-

APPLIES TO


 * Microsoft Office SharePoint Portal Server 2003
 * Microsoft Windows SharePoint Services

-





SUMMARY
This article contains information about site definition and custom templates that are used in Windows SharePoint Services, and discusses some considerations and limitations that apply when you customize templates for use in SharePoint Portal Server.



MORE INFORMATION
Windows SharePoint Services uses two types of templates:  Site definitions:

Site definitions include the set of basic pages and schema where all SharePoint sites and lists are derived. Site definitions contain all the configuration data for the site, and are stored on the file system of each front-end Web server as Web pages and XML files (including the Onet.xml file). A site definition can actually contain multiple configurations, but all the configuration data in a site definition uses the same set of lists that a user can create. For example, the Social Meeting, Multipage Meeting, and Decision Meeting templates that are listed on the Template Selection page are based on the Meetings site definition. Custom templates:

You can save an existing site as a custom template (.stp file). An .stp file contains only the information about what is customized in the site and does not contain the definition of the whole site. Custom templates are a way of packaging up a set of changes to an existing site definition and making those available for new sites and lists. Every custom template is based on a site definition. Custom templates are stored in the database and are made available through the central template gallery or through site collection template galleries. When you save an existing site as a custom template, the .stp file is added to the site template document library in the root of the site collection and can be used by all subsites.

To create a .stp file, follow these steps:  On the site, click Site Settings. Under Administration, click Go to Site Administration. Under Management and Statistics, click Save site as template. In the File name box, type the file name to use for the site template file. In the Template title box, type the title that you want to use for the template in the site template gallery.</li> In the Template description box, type a description for the site template.</li> If you want to include the existing site content, click to select the Include content check box.</li> Click OK.</li></ol>

To add the template to the central template gallery so that it is available to all sites, use the Stsadm.exe command line tool and run the following command at the command prompt:

stsadm.exe -o addtemplate -filename  -title TemplateTitle -description TemplateDescription

</li></ul>

In SharePoint Portal Server, the site templates that are available to the user are the list of site definitions that are stored on the file system. Currently, there is no user interface available in SharePoint Portal Server to export a customized site or area to a site definition nor is there a method to export a custom site template to a site definition.

The only way to add a new item to the list of available templates on the Template Selection page is to copy an existing template, rename it by using a name that starts with &quot;SPS&quot; (without the quotation marks), edit the XML file for all templates to add the new template, and then restart Microsoft Internet Information Services (IIS). You must repeat this procedure on each front-end Web server before the new template appears in the list of available site definitions. Note that you must manually edit the XML files of all existing templates to include the new template.

For more information about working with templates, see the &quot;Working with Templates&quot; topic in the in the &quot;Managing Sites&quot; section of the &quot;Administration&quot; chapter of the Microsoft Office SharePoint Portal Server 2003 Administration Guide. The Microsoft Office SharePoint Portal Server 2003 Administration Guide (Administrator's Help.chm) is located in the Docs folder in the root folder that contains the extracted SharePoint Portal Server 2003 CD.

For more information about SharePoint Portal Server and Windows SharePoint Services, visit the following Microsoft Web site:

http://www.microsoft.com/sharepoint/default.mspx

Keywords: kbpending kbbug KB825217

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.