August 19

by 

 on 8/19/2008 5:08 PM

Category: Team Sites

If you’ve spent much time in SharePoint Designer 2007, you know what content placeholders are, and you know that you need to understand them before you start modifying master pages on a SharePoint site.

 

For those of you who haven’t worked with content placeholders, here’s an overview…

 

A content placeholder is a piece of code (starts with <asp:ContentPlaceHolder… >) that exists on a master page. It works together with a piece of code called a content region (starts with <asp:Content… >) that exists on a content page. Content placeholders are used to designate parts of the master page that will display replaceable content, the content that originates from a content page. This is how master pages are able to serve as templates for other pages on your web site.

 

You establish the general look and feel of your site in a master page—the colors, logos, global navigation, header and footer information. Once you establish the look and feel on a master page, you designate parts of the page that will display unique content originating from a content page, such as corporate documents, company or team events, and business forms. As a SharePoint site, you also need to consider SharePoint collaboration features, like lists, libraries, and wikis. To integrate a master page with your content pages, you use content placeholders.

 

Where can I view, create, and manage content controls?

 

To see the content placeholders that are being used on your SharePoint site, open your site's default master page in SharePoint Designer.

 

If you want to change the value of a content placeholder for your entire site, make the change to the default master page. If you want to change the content inside of a placeholder for a content page on your site, make the change to the content page.

 

What do content placeholders look like in SharePoint Designer?

 

When you open a master page in SharePoint Designer, you see this:

 

Master page

 

(Tip: You may need to turn on the Empty Containers and Visible Borders visual aids in Designer to view the master page this way.)

 

To view the default content placeholders, open the Master Page toolbar. You do this by clicking View > Toolbars > Master Page. A floating toolbar appears. Click the down arrow and then choose one of the content placeholders (see figure).

 

Master Page toolbar

 

This highlights the content placeholder on the master page, which in this case is the PlaceHolderTitleBreadcrumb content control.

 

PlaceHolderTitleBreadcrumb content control

 

Okay enough. Show me a preview of these content placeholders

 

On a Windows SharePoint Services 3.0 master page (Default.master), there are 30 default content placeholders.

 

I’ve listed them below, along with a preview of what each content placeholder looks like on your final web pages. The preview is, in effect, a combination of the content placeholder from the master page and the contents of the corresponding content region from the content page. I’ve highlighted the content placeholder with a red outline to make it easier to see.

 

There are a few content placeholders that have no visual representation. For example, the PlaceHolderBodyAreaClass content placeholder serves as a placeholder for styles. I placed these content placeholders at the end, about where they appear on the master page.

 

PlaceHolderGlobalNavigationSiteMap
Site map used by the global navigation breadcrumb

PlaceHolderGlobalNavigationSiteMap

 

PlaceHolderGlobalNavigation
Global navigation breadcrumb
PlaceHolderGlobalNavigation

 

PlaceHolderSiteName
Site name

PlaceHolderSiteName

 

PlaceHolderSearchArea
Search box area

PlaceHolderSearchArea 

 

PlaceHolderTopNavBar
Top navigation area

PlaceHolderTopNavBar

 

PlaceHolderHorizontalNav
Top navigation menu for the page (defaults with the Home tab)

PlaceHolderHorizontalNav

 

PlaceHolderPageImage
Page icon in the upper-left area of the page

PlaceHolderPageImage

 

PlaceHolderCalendarNavigator
Date-picker for navigating a calendar, when enabled

PlaceHolderCalendarNavigator

 

PlaceHolderTitleAreaSeparator
Displays shadows for the title area

PlaceHolderTitleAreaSeparator

 

PlaceHolderLeftNavBarDataSource
Data source for the left navigation menu

PlaceHolderLeftNavBarDataSource

 

PlaceHolderLeftNavBarTop
Top of the left navigation area

PlaceHolderLeftNavBarTop 

 

PlaceHolderLeftNavBar
Left navigation area (contains the Quick Launch)

PlaceHolderLeftNavBar

 

PlaceHolderLeftNavBarBorder
Border element on the left navigation bar

PlaceHolderLeftNavBarBorder

 

PlaceHolderLeftActions
Bottom of the left navigation area

PlaceHolderLeftActions

 

PlaceHolderPageTitleInTitleArea
Page title shown immediately below the breadcrumbs

PlaceHolderPageTitleInTitleArea

 

PlaceHolderPageDescription
Description of the page contents

PlaceHolderPageDescription

 

PlaceHolderTitleBreadcrumb
Main content breadcrumb area

PlaceHolderTitleBreadcrumb

 

PlaceHolderTitleLeftBorder
Left border of the title area

PlaceHolderTitleLeftBorder

 

PlaceHolderTitleRightMargin
Right margin of the title area

PlaceHolderTitleRightMargin

 

PlaceHolderBodyLeftBorder
Border element for the main page body

PlaceHolderBodyLeftBorder

 

PlaceHolderMain
Main content of the page

PlaceHolderMain

 

PlaceHolderBodyRightMargin
Right margin of the main page body

PlaceHolderBodyRightMargin

 

PlaceHolderMiniConsole
A place to show page-level commands (for example, the Edit Page, History, and Incoming Links WIKI commands)

PlaceHolderMiniConsole

 

WSSDesignConsole
The page editing controls when the page is in Edit Page mode

WSSDesignConsole

 

PlaceHolderNavSpacer
The width of the left navigation area

PlaceHolderNavSpacer

 

PlaceHolderFormDigest
The "form digest" security control

PlaceHolderFormDigest

 

PlaceHolderUtilityContent
Extra content at the bottom of the page

PlaceHolderUtilityContent

 

SPNavigation
Used for additional page editing controls. (Empty by default in Windows SharePoint Services 3.0.)

SPNavigation

 

PlaceHolderBodyAreaClass
Additional body styles in the page header

PlaceHolderBodyAreaClass

 

PlaceHolderTitleAreaClass
Additional styles in the page header

PlaceHolderTitleAreaClass

 

For more information

 

For more information on default content placeholders, including how to modify them in SharePoint Designer, see the article, Modify the default SharePoint content placeholders on Office Online.

 

All for now…

 

Tom

 

Technical Writer

SharePoint End User Content

 

Please follow and like us: