Reset a customized page to the site definition

With Microsoft Office SharePoint Designer 2007, you can quickly create a professional-looking site from site templates such as the Team Site and Document Workspace templates. Then you can take one of the pages that is included in a template and customize it further to make it your own. For example, many Web designers customize their home page (default.aspx) with their organization or team logo, contact names, custom Web Parts, and more.

Sometimes, however, you may want to remove customizations and go back to the site definition. For example, you might want to reset to the site definition when:

  • Your customizations don't turn out as well as you had hoped. For example, although the customizations might look how you want, some important functionality in the master page was accidentally removed.
  • Your site is upgraded to Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007, and you want to reset to the new site definition in order to take advantage of new features like tabbed links to subsites, the Recycle Bin, breadcrumbs to more easily identify what page you are on, and enhanced search.

This article shows you how to identify pages that have been customized and how to reset a customized page to the site definition. You can reset pages to the site definition in both Windows SharePoint Services 3.0 sites and Office SharePoint Server 2007 sites.

In this article


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. Find links to more information about versioning in the See Also section.

Top of Page Top of Page

Identify customized pages

Begin by identifying the customized pages in your site. To do this, you can open the site in Office SharePoint Designer 2007 and then look in the Folder List for pages that have the Page is customized icon next to the file name, as shown in the following illustration.

File name with Page Is Customized icon

You can also run a report in Office SharePoint Designer 2007 to list all of the customized pages in your site.

  1. In Office SharePoint Designer 2007, open the Web site for which you want to run the report.
  2. On the Site menu, point to Reports, point to Shared Content, and then click Customized Pages.

The report opens with all pages in the site listed, and the Customized column indicates whether content has been customized for that page.

  1. To display only pages that have been customized, click the down arrow to the right of the Customized column, and then click Yes.

The report now displays only pages that have been customized.

Top of Page Top of Page

Reset a default master page to the site definition

When you create a SharePoint site, many of the site's pages take their structure, functionality, fonts, and formatting from a default master page. For example, in a Windows SharePoint Services 3.0 team site, the default master page is called default.master. Here are the steps to take if you have customized the default master page but want to reset it to use the site definition. Any pages that were attached to the customized default master page are attached to the reset version of the file — not the copy.

 Note   Resetting a customized page to the site definition restores the page to its original condition. However, if you are working with master pages, you have an alternative. Master pages reside in the Master Page Gallery, which is a document library, and you can use versioning for items in lists and 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. Find links to more information about versioning in the See Also section.

  1. In Office SharePoint Designer 2007, open the Web site where the customized master page resides.
  2. Right-click the master page that you want to reset, such as default.master, and then click Reset to Site Definition on the shortcut menu.

 Note   By default, in the Folder List, master pages are located in the masterpages folder, which is in the _catalogs folder in the site.

A warning message informs you that the master page's contents will be overwritten, but that a backup copy of the current page will be created.

  1. Click Yes.

A copy of the customized master page is placed in the same directory where the reset master page resides and is named file name_copy(1), where file name is the original file name, as shown in the following illustration.

Folder list showing backup copy of customized master page

 Note   The default.master page is no longer identified by the Page is customized icon because the page has been reset to the site definition.

Top of Page Top of Page

Reset a page to the site definition

If you have customized a page that was originally generated from a SharePoint template, you can reset it to the site definition.

  1. In Office SharePoint Designer 2007, open the Web site where the customized page resides.
  2. Right-click the page that you want to reset to the site definition, and then click Reset to Site Definition on the shortcut menu.

 Note   The reset 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, the page has no association with the site definition. 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 an 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.

A warning message informs you that the page's contents will be overwritten, but that a backup copy of the current page will be created.

  1. Click Yes.

A copy of the customized page is placed in the same directory where the reset page resides and is named file name_copy(1), where file name is the original file name.

 Tip   Note that when you use the browser user interface in Windows SharePoint Services 3.0 to reset a page to the site definition, no backup copy of the customized page is created. However, when you reset a page in Office SharePoint Designer 2007, a backup copy is created. The backup copy is useful because it still contains any customized content that you added to the page, such as Web Part zones — and the Web Parts inside them — that you added to the page. You can copy and paste any of this content that you want to keep from the copy to the newly reset page.

  1. If your customized page has Web Part zones on it that are not included in the site definition, those additional Web Part zones — and the Web Parts inside them — are removed when the page is reset. Check to see whether the reset page includes all of the Web Parts that you want. You can add any missing Web Parts back to the newly reset page by opening the backup copy of the customized page and then copying and pasting the Web Parts onto the reset page.

Top of Page Top of Page

 
 
Applies to:
SharePoint Designer 2007