08.08.2017 Views

designer

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

388 Chapter 11 Working with Master Pages<br />

Tip In SharePoint Designer, content placeholders are also known as content regions. If<br />

you developed a common look and feel for a site on Windows SharePoint Services 3.0 or<br />

SharePoint Server 2007 by using Dynamic Web Templates (DWT), the concept of content<br />

regions will not be new to you.<br />

When you create a new content page from a master page, all content placeholders<br />

cannot contain any unique content—that is, all content placeholders are placed<br />

in a non editable state. In SharePoint Designer, the text in the label above the content<br />

placeholder will look similar to PlaceHolderNAME (Master). When you open an existing<br />

content page, such as Home.aspx, you see Custom in the placeholder name, such<br />

as PlaceHolderNAME (Custom). This indicates that unique content can be placed within<br />

the region defined by the content placeholder. You worked with this aspect of a content<br />

placeholder in Chapter 4 if you completed the exercise to create a new page from a master<br />

page. All the content placeholders on that page were marked with Master. You enabled<br />

the PlaceHolderMain content region as editable, and as a result, Custom replaced<br />

Master. You were then able to add content to your content page. Adding content to a<br />

content placeholder on the master page allows you to specify content that is visible on<br />

every content page associated with that master page, but it also allows you to customize<br />

that content for each particular content page.<br />

While working with master pages in SharePoint Designer, you manage content placeholders<br />

by using the Manage Content Regions command on the ribbon’s Style tab.<br />

Content placeholders cannot be managed from a content page. When the Manage<br />

Content Regions command is clicked on a content page, a warning dialog box appears,<br />

asking if you want to save the content page as a master page.<br />

In this exercise, you will place the DVWP you created in the previous exercise in a content<br />

placeholder on the master page. Then, on a content page, you will override a content placeholder<br />

and revert to a content placeholder on the master page.<br />

SET UP Using SharePoint Designer, open the team site you used in the previous<br />

exercise if it is not already open. Check out and open v4-test.master so that it<br />

appears in the workspace in Split view in advanced edit mode.<br />

Manage Content<br />

Regions<br />

1. In the Design view portion of the workspace, scroll down if necessary and click<br />

the DVWP you created in the previous exercise in this chapter. Select the label<br />

(WebPartPages: DataFormWebPart) when it appears.<br />

The DVWP code is highlighted in the Code view portion of the workspace.<br />

2. On the Style tab, click Manage Content Regions in the Master Page group.<br />

The Manage Content Regions dialog box opens.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!