Creating and Modifying Web Pages in Microsoft Office SharePoint Designer 2007

  • 1/9/2008

Creating a Web Part Page by Using a Browser

When a SharePoint site is created, it contains a number of page, most of which contain Web Parts. You can create additional pages, known as Web Part Pages. You can only use the browser to create Web Part Pages, and when you create these pages they are stored and accessed via document libraries.

When you use SharePoint Designer to create an ASP.NET page, you are not limited to storing them in a document library; as you will see later in this chapter, you can store pages in the root of the site or in a folder. However, if you plan to create a large number of pages, you should create a document library specifically for this purpose. You can use this document library to store both the pages you create using SharePoint Designer and those you create using the browser. Then users who need to access or customize the pages by using the browser do not need to know which method you used to create the pages, and you can use the document management features of SharePoint to manage the pages.

When you create Web Part Pages, you use one of eight built-in Web Part Page templates stored on each Web server as a basis. Web Part Pages are ASP.NET pages associated with a master page and pre-populated with a number of empty Web Part zones, each with a unique name. Each template has a different column and zone layout so that you can choose the one that best suits your needs. When you create a page based on one of these Web Part Page templates, you create an un-customized page; that is, no page is stored in the Microsoft SQL Server content database—there is simply a pointer to the Web Part Page template on the file system.

Each template contains one Web Part that you can modify to display a title, caption, description, and icon. You can you add one or more Web Parts to one or more zones that the template contains as you modify the page. Information concerning Web Parts that you add to Web Part zones and their properties is stored in the SQL Server content database, but in a separate table from the table, that stores the page. Therefore, when you insert or modify a Web Part, the page can still point to the Web Part Page template in the TEMPLATE folder on the Web server. (This is true for any page created from a site definition file.)

SharePoint Designer does not provide a separate method of saving Web Part modifications; you have to save the page for SharePoint Designer to save the modifications to the Web Part. Saving the page results in a customized page, even though you have not modified the page’s static content. If you do not want to save the page in the SQL Server content database (that is, if you want your page to remain an un-customized page), you can use the Revert To Site Definition option without losing any Web Part modifications.

In the following exercise, you will create a document library in which to store Web Part pages. You will also create a Web Part page and modify Web Part properties.

  1. Click Site Actions, and then click Create.

    The Create Page Web page is displayed.

  2. Under Libraries, click Document Library.

    The New page is displayed.

  3. In the Name text box, type WebPages.

  4. In the Document Template area, in the Document template list, click Web Part Page.

  5. At the bottom of the page, click the Create button.

    The All Documents view of the new Web Part Pages document library is displayed.

  6. Click the New button.

    The New Web Part Page page is displayed.

  7. In the Name text box, type WebShipping.

  8. In the Layout area, in the Choose a Layout Template list, click Header, Right Column, Body, and at the bottom of the page, click Create.

    The new Web Part page is displayed with three distinct Web Part zones: Header, Body, and Right Column. The page is empty except for the top link bar, the breadcrumb, and the Site Actions link. No Web Parts are placed within the Web Part zones.

  9. Open the teams.consolidatedmessenger.com team site in SharePoint Designer. In the Folder List task pane, expand the WebPages document library to display its contents.

    WebShipping.aspx should appear.

  10. Double-click WebShipping.aspx.

    The WebShipping page opens in the document window. The main PlaceHolderMain content region contains the Header, Body, and Right Column Web Part zones. The PlaceHolderPageTitleInTitleArea content region contains a fourth Web Part zone labeled TitleBar, which includes the Web Part Page Title Bar Web Part.

  11. In the Web Part Page Title Bar Web Part, right-click WebShipping, and then click Web Part Properties.

    httpatomoreillycomsourcemspimages1155039.jpg

    The Web Part Page Title Bar dialog box opens.

  12. In the Title text box, place the cursor between Web and Shipping and press httpatomoreillycomsourcemspimages1155041.png, then click OK.

    The dialog box closes, and an asterisk appears on the WebShipping.aspx tab.

  13. On the Common toolbar, click the Save button.

    httpatomoreillycomsourcemspimages1154873.jpg

    Save

    The Site Definition Page Warning dialog box opens, stating that saving your changes will customize a page from the site definitions.

  14. Click Yes.

    The dialog box closes, and in the Folder List task pane, a blue information circle appears to the left of WebShipping.aspx.

  15. In the Folder List task pane, right-click WebShipping.aspx, and then click Reset to Site Definition. When the Site Definition Page Warning dialog box appears, click Yes.

    In the Folder List task pane, the blue information icon to the left of WebShipping disappears and WebShipping_copy.aspx appears with a blue information icon. The WebShipping.aspx page in the document window refreshes, showing that your modification to the Web Part properties remain.