Creating and Modifying Web Pages in Microsoft Office SharePoint Designer 2007

  • 1/9/2008

Attaching a Master Page

In the previous exercises, you created an ASP.NET page and added Web Part zones and Web Parts to it, but it did not contain any SharePoint site navigation nor did it inherit any look and feel from the SharePoint site. You can envisage the page we created as just the content page. It is not associated with a master page, which is the page that defines the common user interface and code.

In this exercise, you will attach a master page to an existing page.

  1. On the Format menu, point to Master Page, and then click Attach Master Page.

    The Select A Master Page dialog box opens.

  2. In the Select a Master Page dialog box, click Default Master Page (~masterurl/default.master).

    httpatomoreillycomsourcemspimages1155069.png
  3. Click OK to open the Match Content Regions dialog box.

    httpatomoreillycomsourcemspimages1155071.jpg
  4. Click OK to accept the default of associating all the code within the HTML body tags of the current page, ParcelDelivery.aspx, to the content region, PlaceHolderMain on the master page.

    SharePoint Designer redisplays ParcelDelivery.aspx, which now has a SharePoint look and feel.

    httpatomoreillycomsourcemspimages1155073.jpg
  5. On the Common toolbar, click the Save button and then press httpatomoreillycomsourcemspimages1155065.jpg to review the page in the browser.

    httpatomoreillycomsourcemspimages1154873.jpg

    Save