Wednesday, August 20, 2008

Steps to create a custom Site Definition.

1. At the top level of the project, create a RESOURCES and TEMPLATE folder. These will be deployed to the \Program Files\Common Files\Microsoft Shared\web server extensions\12 folder.

2. Create a folder here with the same name as your site definition (for ex. MySiteDef) and create an XML folder TEMPLATE\SITETEMPLATES\MySiteDef\XML

3. Create an xml file within the XML folder named ONET.xml
TEMPLATE\SITETEMPLATES\MySiteDef\ONET.XML
The ONET.xml file serves as the high-level manifest for the site definition and references the components that are to be used.

4. Create an empty XML file and paste in certain elements from the STS Team site definition, while defining the core of the elements yourself. Specify the xmlns in the Project tag in order to get intellisense.
xmlns:ows="Microsoft SharePoint"
xmlns="http://schemas.microsoft.com/sharepoint/">

5. A WEBTEMP file references configurations in the site definitions ONET.xml file. The naming convention is WEBTEMP.[solution].xml. Create a WEBTEMP file in the TEMPLATE\1033\XML folder. (or choose or locale instead of 1033).


Copyright Ashlen Consulting Services Pty Ltd c 2008

0 comments: