SharePoint Stuff

A collection of helpful tips and resources on maximising the value from a SharePoint Portal Server and Windows SharePoint Services Implementation.

Friday, August 18, 2006

How To Create a New Site Definition

To create a new WSS Site Definition
1. Make a copy of STS folder in “Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033” and give it a unique name (say MYWSS). Make sure that the folder name is all in capitals.

2. Create a new XML file called WEBTEMPMYWSS.XML (all capitals) in the Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\XML folder. The file name MUST be WEBTEMP followed by whatever you have called the folder.

3. Add the following lines to the xml file

< ows="Microsoft SharePoint">
< id="10001" name="MYWSS">
< configuration id="0"
title="My New WSS Site Definition"
description="Use this template for creating all WSS sites on this portal.">
< /configuration>
< /template>
< /templates>

a. Template Name must be the same as the folder name – and in all capitals
b. ID must be unique commencing from 10000
c. Configuration Title is the title you wish to display in the template pick list box.
d. ImageURL if you have a custom image you wish you display in the template pick page when users select MYWSS – or you can just use the default.
e. Description is displayed when the user clicks on MYWSS in the template pick page.

6. Restart IIS

MYWSS should appear in the Template Pick page when creating a new site. If you ever wish to remove the site definition, and WSS sites exist that are based on it change the “Hidden” attribute to “TRUE” in the XML file above. Under no circumstance should you delete the MYWSS folder or WEBTEMPWSS.XML files.