Creating and Modifying Web Pages in Microsoft SharePoint Designer 2010

  • 12/23/2010

Managing Web Pages

As a team site owner with the default SharePoint Designer access configuration, you can manage files on a per-file basis only in the Site Pages and Site Assets libraries. These are the two main libraries you use when you develop SharePoint solutions. The Site Pages library contains your content pages, and the Site Assets library contains other files, such as images, cascading style sheets, XML files, and JavaScript files. As a site collection owner, by using the All Files option in the Navigation pane, you can access all files in all libraries.

On publishing sites, publishing pages are stored in the Pages library and not in the Site Pages library. By default, a publishing site does not contain a Site Pages or Site Assets library. However, if you open a publishing site with SharePoint Designer, both these libraries are created.

When you click a file on the Site Pages or Site Assets gallery page, the files settings page is displayed, which is divided into four areas:

  • File Information. Provides key information about the file, such as file name, created by, last modified by, file version, check in/check out status, and whether the file is based on a file from the site definiton or has been customized.

  • Customization. Use to edit the file or manage the file properties in the browser.

  • Permissions. Use to manage the permission settings for the file. By default, the file inherits its permissions from the list it is stored in, and the list commonly inherits its permissions from the site. As with the site settings page, you can use the Permissions area on the file settings page to stop inheriting permissions, thereby creating unique permissions for the file. Then you can add or remove users or SharePoint groups and configure the access rights of those users and groups to the file by using permission levels.

  • Version History. Use to restore and delete versions of a file. The version numbers are hyperlinks that open the File Version Summary dialog box. Both the Site Pages and the Pages libraries are configured with versioning enabled. The Site Pages document library uses major versions.

When a file’s setting page is displayed, the Page tab is visible on the ribbon. This tab allows you to edit, delete, and rename the file; reset the file to the site definition; set the file as the site’s home page; check in, check out, and undo the check out of the file; and preview the file in the browser. You are also given a choice of programs in which to edit the file. Any deleted files are stored in the Recycle Bin, from which you can restore them.

In this exercise, you restore a previous version of a file, check in and check out a file, and delete a file.

  1. In the Navigation pane, click Site Pages to display the gallery page, and then click Home_copy(1).aspx.

    The Home_copy(1).aspx settings page is displayed. The File Information area shows the current version of the file, and the Permissions area states that the file inherits permissions from its parent. The Version History area displays a number of versions of the file, although the current version of the file is not listed in the Version History area.

  2. On the Version History area, right-click the Modified By column heading, point to Arrange by, and click Modified Date.

    httpatomoreillycomsourcemspimages1806323.jpg

    The Version History area is redisplayed and lists the file versions in modified date order, newest to oldest.

  3. Right-click the icon to the left of 1.0, and click Restore Previous Version.

    httpatomoreillycomsourcemspimages1806325.jpg

    A dialog box opens warning you that the file must be checked out before a previous version of the file can be restored.

  4. httpatomoreillycomsourcemspimages1806327.jpg Click OK to close the dialog box, and then on the Page tab, click Check Out in the Manage group.

    In the File Information area, the file version is increased, and in the Version History area the original version of the file is displayed at the top of the list.

  5. httpatomoreillycomsourcemspimages1806329.jpg Repeat step 3, and then on the Page tab, click Check In in the Manage group.

    The Check In dialog box opens.

  6. In the Enter comments for this version box, type Restoring the original version of the Home_copy(1).aspx page, and then click OK.

    The Check In dialog box closes.

  7. httpatomoreillycomsourcemspimages1806127.jpg On the Page tab, click Preview in Browser.

    A browser window opens. The modifications you made earlier in this chapter are no longer displayed, and the Welcome To Your Site! text is displayed.

  8. Close the browser window. In SharePoint Designer, on the Page tab, click Delete Page in the Edit group.

    httpatomoreillycomsourcemspimages1806331.jpg

    The Confirm Delete dialog box opens.

  9. Click Yes to confirm the deletion.

    If you have multiple tabs open, the workspace displays a message that SharePoint Designer cannot display the item; otherwise the Site Pages gallery is displayed.

  10. httpatomoreillycomsourcemspimages1806263.jpg On the breadcrumb, click Site Pages if the Site Pages gallery is not displayed. Click the icon to the left of Home.aspx, and on the Pages tab, click Set as Home Page in the Actions group.