Search This Blog

Tuesday, January 11, 2011

Site Definitions And Custom Templates

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:
  1. On the site, click Site Settings.
  2. Under Administration, click Go to Site Administration.
  3. Under Management and Statistics, click Save site as template.
  4. In the File name box, type the file name to use for the site template file.
  5. In the Template title box, type the title that you want to use for the template in the site template gallery.
  6. In the Template description box, type a description for the site template.
  7. If you want to include the existing site content, click to select the Include content check box.
  8. Click OK.
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 FileName -title TemplateTitle -description TemplateDescription
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 "SPS" (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 "Working with Templates" topic in the in the "Managing Sites" section of the "Administration" 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:


  1. If you are going for most excellent contents like myself, just visit this web page daily since it presents feature contents, thanks

    Also visit my weblog Free Nintendo eshop codes

  2. DreamHost is definitely one of the best web-hosting provider with plans for all of your hosting needs.