Thursday, April 8, 2010

Site Definitions

Think of site definitions as templates defining master/layout pages, design, lists, libraries anything a site can consists of. Site definitions are built using Collaborative Application Markup Language (CAML), a combination of XML and HTML, defined in a file ONET.XML. When a site definition is selected while a SharePoint site is being provisioned, all the elements in Site Template are applied to the site. In case if there are any changes made to site templates after a site is provisioned, changes can optionally pushed down to the site.

WSS as well as MOSS give various site templates out-of-the-box. For example, Team site. The only difference between various templates is the layout, which lists or libraries are predefined, features available, web parts etc. Each of these site templates have a specific purpose to serve. If none of these templates fit if our needs, we can always create our own custom site templates and upload them to template gallery.

Some of the Site Definitions are given below

  • Wiki Site Definition (WSS)
  • Blog Site Definition (WSS)
  • Document Center (MOSS)
  • Site Directory (MOSS)
  • Report Center (MOSS)
  • Search Center (MOSS)
  • My Site (MOSS)

Site Definitions that are shipped with WSS 3.0 primarily contain eight web parts.

  • Content Editor Web Part
  • Form Web Part
  • Image Web Part
  • Page Viewer Web Part
  • Relevant Documents
  • Site Users
  • User Tasks
  • XML Web Part

MOSS Site Definitions use all the above web parts along with many more additional web parts.

Site Definitions can be created in three ways

  • By exporting Site Definitions from an existing site
  • By using SharePoint Designer (SPD)
  • By using MS Visual Studio

Creating Site Templates with User Interface

Site Template (.stp) files can be created from existing site by exporting the Site Definition. Here are the steps

  1. From the home page select Site Actions -> Site Settings
  2. Under Look-and-Feel Group, select Save As template option

IMPORTANT NOTE: There is only one gallery per site collection. Site Definitions created in any hierarchy of sites, they are only stored at one place, which is at the site collection level.


No comments:

Post a Comment