Creating Site Definitions

It is interesting to note that if you don't change a built-in page, SharePoint doesn't include it in the custom template. In that case, the built-in page comes from the SharePoint site definition.

Viewing changed pages in a template file

Figure 3-5. Viewing changed pages in a template file

Site definitions are how SharePoint provides predefined templates. These definitions are made up of a number of files that reside on the SharePoint server's file system. You can view the site definitions by browsing the SharePoint server's C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE folder.

SharePoint groups the site definitions into two subfolders: .\1033\STS contains the site definition for the Team, Document Workspace, and Blank site templates; .\1033\MPS contains the site definition for the Meeting workspace site templates. Table 3-3 lists the files SharePoint uses to locate, define, and set the content for its site definitions.

Table 3-3. SharePoint site-definition files

File(s)

Use to

Location

DocIcon.xml

Add file types and control how those files are opened from all sites.

.\XML

WebTemp.xml

Add or hide site definitions.

.\1033\XML

Default.aspx

Define scripts and layout of the home page for the site.

.\1033\STS or .\1033\MPS

ONet.xml

Define the navigation areas, list definitions, document templates, default lists, configurations, and modules ...

Get Essential SharePoint now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.