SharePoint 2013 - SPLessons

SharePoint Page layouts

Home > Lesson > Chapter 24
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

SharePoint Page layouts

SharePoint Page layouts

When you use Design Manager to create a page layout, two files are created: an .aspx file that SharePoint uses, and an HTML version of that page layout that you can edit in your HTML editor. The HTML file and page layout are associated, so that whenever you edit and save the HTML file, your changes are synced to the associated page layout. When you create a master page, you upload and convert an HTML file directly into a master page. But, unlike a master page, you do not directly convert an HTML file into a page layout. This is because the primary purpose of a page layout is to contain page fields, and these page fields must get added when the page layout is created in Design Manager. For example, if you have a pair of associated files (HTML and .aspx) and you edit the .aspx file without breaking the association, the .aspx file changesare saved, but you can't check in or publish the .aspx file, so those changes are not saved in a meaningful way. Any changes to the HTML file override the .aspx file. A page layout is a template for a specific type of page in your site, page layout as defining the layout or structure for the body of a page.

When you create a page layout

  • An .aspx file and an HTML file with the same name are created in the Master Page Gallery.
  • All markup required by SharePoint is added to the .aspx file so that the page layout renders correctly.
  • Page fields unique to the content type are added automatically to the page layout. Other page fields are available to be added from the ribbon in the Snippet Gallery.

Create a Page Layout Design Manager

Go to the sharepoint site and the upper-right corner of the page, choose Settings, and then choose Design Manager. In Design Manager, in the left navigation pane, choose Edit Page Layouts.Choose Create a page layout. In the Create a Page Layout dialog box. enter a name for your page layout, Select a master page At this point, SharePoint creates an HTML file and an .aspx file with the same name. In Design Manager, your HTML file now appears with a Status column that shows one of two possible statuses will come Warnings and Errors and Conversion successful  

Create a Page Layout SharePoint Designer

Open the sharepoint desinger and selct the Pagelayouts option in side menu. Select new page layout in top menu, enter the page layout name and url Click on Ok button