What is a site definition?

A site definition is a group of files that reside on the Web server and that define a unique type of SharePoint site. Each SharePoint template that appears on the Web Site tab of the New dialog box is based on a site definition. For example, one site definition defines the Team Site, Blank Site, and Document Workspace templates, and another site definition defines the Basic Meeting Workspace, Blank Meeting Workspace, Decision Meeting Workspace, Social Meeting Workspace, and Multipage Meeting Workspace templates.

When you reset a customized page to the site definition, you discard all changes to that page and revert it to how it was originally defined in the site definition. But note that you don’t lose any customizations that you have made to Web Parts, as long as those Web Parts reside in a Web Part zone that exists on the site definition page. Web Part zones — and the Web Parts inside them — that you add to a site definition page are discarded when you reset the page.

For example, you can insert a Content Editor Web Part in a Web Part zone (a default zone, not one that you added) on a site definition page such as the default home page (default.aspx), and then enter custom content or text in the Web Part. If you reset that page to the site definition, all other changes are discarded, but the Content Editor Web Part still appears in the zone and still contains the custom content that you entered.

The Reset to Site Definition command is not available for every page in a site. If the page was not created by customizing an existing page, but instead was either created from a blank page or created in another program and then imported into the site, then the page has no association with the site definition, and therefore you cannot reset it to the site definition. For example, the Team Site template includes the default. master, list forms such as DispForm.aspx and EditForm.aspx, and a Microsoft Office Word document that is a template for documents in the Shared Documents library. Any of these pages can be reset because they are included in the site definition, but any new pages created from default. master, any new blank ASPX pages, and any custom list forms that you create cannot be reset.

Note: Resetting a customized page to the site definition restores the page to its original condition. However, if you are working with pages that reside in a document library, you have an alternative. For example, master pages reside in the Master Page Gallery, which is a document library, and you can use versioning for files in document libraries. If you have the versioning feature turned on for the Master Page Gallery when you modify a master page, you can subsequently roll back to a previous version instead of starting over by resetting to the site definition.

Advertisements

~ by Neha Sinha on March 6, 2008.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: