Wednesday, 29 August 2012

Understanding Publishing Pages

Understanding Published Pages
Site pages that appear in publishing sites have a different structure than those contained in nonpublishing sites. In this section, you will examine what makes publishing pages unique.

Anatomy of a Publishing Page
In a nonpublishing site, pages are essentially normal ASP.NET pages that contain two layers: a master page and a content page. The master page contains the markup that defines the structure and general layout of the page. This usually includes headers, footers, menus, and content placeholder controls. The content page is then created by defining content to be placed in each of the content placeholders in the designated master page.


Publishing pages are based on the same framework as nonpublishing pages, but the content page Layer is split into two sub layers  the page layout and the content. A page layout (a.k.a. a layout page) defines the content that goes into the placeholders defined in the underlying master page. The page layout also defines its own controls that act as placeholders to be filled in by the content page.

At first glance, this may seem to be an unnecessary complication of the page structure. Why should Adding a third layer make any difference? The answer is found in the mechanism used to deliver the Content to the controls in the layout page.

Publishing Content Types

Each page layout is associated with a SharePoint content type. Recall that content types allow us to define the data fields associated with list items in SharePoint. The content types used with page publishing always derive from a base type named Page. These types, creatively called page content types, contain fields that support the publishing and scheduling mechanisms of publishing sites.

The content type for a particular page layout contains fields, in addition to those associated with the Page type, that represent the content that should appear on the site page. As a result, the content changes for a web page are reduced to simple data fields, making them much easier to manage than the HTML and ASP.NET markup that make up a nonpublishing content page.



Standard Publishing Content Types and Layouts

Article page
o   ArticleLeft.aspx
o   ArticleLinks.aspx
o   ArticleRight.aspx
o   PageFromDocLayout.aspx
Enterprise Wiki page
o   EnterpriseWiki.aspx
Project page
o   ProjectPage.aspx
Redirect page
o   RedirectPageLayout.aspx
o   VariationsRootPageLayout.aspx
Welcome page
o   BlankWebPartPage.aspx
o   WelcomeLinks.aspx
o   WelcomeSplash.aspx
o   WelcomeTOC.aspx

Note: Page layouts are not stored in the site but in the Master Page Gallery associated with the site collection. This is important because it changes how page layouts are managed. When a page layout is modified, it affects the entire site collection, not just one site. Therefore, the security and approval requirements for page layouts are more like those for master pages than for ordinary site pages in nonpublishing sites.






No comments:

Post a Comment