Thursday, September 12, 2013

Master pages, page layouts, and pages in sharepoint


SharePoint uses templates to define and render the pages that a site displays. The structure of a SharePoint page includes three main elements:
  • Master pages define the shared framing elements—the chrome—for all pages in your site.
  • Page layouts define the layout for a specific class of pages.
  • Pages are created from a page layout by authors who add content to page fields.
Figure 1. Master page, page layout, and page

Master page, page layout, and page

Master pages

A master page defines the chrome (the shared framing elements) of your site. These elements may include the header and footer, top navigation, breadcrumbs, search box, site logo, and other branding elements. The master page remains consistent as visitors navigate through your site.
Figure 2. Master page

Master page A master page also defines regions called content placeholders that are filled in by content from matching regions on page layouts. Most commonly, the body of a master page contains just a single content placeholder (named PlaceHolderMain, which is created automatically), and all of the content from a page layout appears inside this one content placeholder (the PlaceHolderMain content placeholder is outlined in red in Figure 3).
Figure 3. Master page with page layout outlined

Master page with page layout outlined When you preview a master page in Design Manager, you see the following message. This
resides inside the main content placeholder. Put simply, the master page defines the chrome of a page, and the page layout defines the body contained in the main content placeholder.
Figure 4. Master page preview message

Master page preview message

Page layouts

A page layout is a template for a specific type of page in your site, such as an article page or a product details page. Just like its name implies, you can think of a page layout as defining the layout or structure for the body of a page.
Figure 5. Page layout

Page layout Page layouts define regions or content areas that map to content placeholders on the master page (outlined in red in Figure 6). Again, the most common scenario is that a page layout defines a single content region that maps to the single content placeholder that is created automatically on a master page.
Figure 6. Content region and content placeholder

Content region and content placeholder

Page field controls

The primary purpose of a page layout is to arrange page fields. When you design a page layout, you insert, position, and style elements called page field controls. These controls will eventually contain content when an author creates a page based on that page layout. In addition to page fields, page layouts can also contain Web Part zones, to which content authors can add Web Parts. (Master pages can't contain Web Part zones.)
With a page field control, you can define the styles used by the content. Authors can add content to a page, but the designer has ultimate control over how that content is rendered through CSS applied to those controls.
Figure 7. Page layout with page field controls

Page layout with page field controls Every page layout is associated with a content type in the Pages library of a site. A content type is a schema of columns and data types. For any page layout, the page fields that are available for that layout correspond directly to the columns defined for that page layout's content type.

Relationship of master pages and page layouts

Together, a master page and a page layout create a content page.
Figure 8. Master page with page layout

Master page with page layout The master page defines the chrome for all pages in the site so, often many page layouts (and therefore many pages created from those page layouts) are associated with one master page.
Figure 9. One master page tied to three page layouts

One master page tied to three page layouts But, your site will likely use multiple master pages. For example, in addition to the default master page, you may have one or more master pages that target specific devices such as smart phones or tablets. In this case, one page layout is used by many master pages (see the section about device channels).
You can use one master page per channel per SharePoint site.

Pages

Authors can create pages and add content to the page fields, and they can add Web Parts to any Web Part zones or Rich Text Editors. Pages are structured so that content authors cannot make changes outside of page fields.
Figure 10. Page with authored content

Page with authored content The rendered page is what site visitors see. When a page is requested by the browser, the master page is merged with a page layout to create a content page, and the content for that page is merged into the page fields from that page in the Pages library.
Figure 11. Rendered page in browser

Rendered page in browser
Figure 12. Master page, page layout, and page

Master page, page layout, and page

No comments:

Post a Comment

How to Build interactive Design in Power Pages

 Need to Create a design in figma/or any UX tool Create a Power pages site. Create new Page Open page in VS Code in every page there are the...