This is a blog post in the series “How to set up a product-centric website in SharePoint Server 2013”. In this series, I'll use data from a fictitious company called "Contoso" to show you how to use search features to set up a website based on product catalog data.
Note: Most of the features described in this series are not available in SharePoint 2013 Online.
For an overview of the blog posts in this series, go to How to set up a product-centric website in SharePoint Server 2013.
In my previous blog post, I showed you how to upload and apply a new master page. The next step in giving our site a "Contoso look", is to create new pages.
In this blog post we'll learn:
- About page layouts.
- About pages and rendered pages.
- How to upload a new page layout.
- How to turn off versioning for the Pages library.
- How to create a page based on a page layout.
Note: This blog post will not cover how to create a page layout. It explains how to upload already finalized page layouts. These files will not be made available for download.
Start stage 7
A page layout is a template for a page in your site. This is where you define the layout and structure for the body of a page.
Page layouts contain page field controls and Web Part zones. Page field controls and Web Part zones are placeholders that define where content can be added by authors. They are added to a page layout at a specific position, for example on the left side of a column, and with specific style elements, such as bold.
For more information, see Overview of the SharePoint 2013 page model, and How to: Create a page layout in SharePoint Server 2013.
It is important to understand that authors do not add content to a page layout. Content is added to a page.
A page is created based on a specific page layout. Once you've created a page, authors can add content that they want to display on their website to the page. Because the page is based on a page layout with page field controls and Web Part zones, authors cannot add content outside of these areas.
When visitors browse a site, they will see a rendered page. In a rendered page, the master page is merged with the page layout, and the content for the page is displayed in the page fields and Web Part zones.
For more information, see Overview of the SharePoint 2013 page model.
In our Contoso scenario, we have two page layouts; one for the category page, and one for the catalog item page.
In my previous blog post, I showed you how to map a network drive. Because we have mapped our network drive, uploading these page layouts becomes very easy. Simply drag and drop the files into your Master Page Gallery.
In SharePoint, refresh the Master Page Gallery page to see that the two page layouts have been added. Also notice that an associated ASP.NET file has been created for each of the page layouts.
In our scenario, I am not using SharePoint workflows for approval. My files have already been approved, so before I create a new page, I want to turn off versioning for the Pages library.
To turn off versioning for the Pages library:
- From the Site Settings menu, select Site contents.
- On the Site Contents page, click Pages.
- In the Pages library, on the LIBRARY tab, click Library Settings.
- On the Settings page, click Versioning settings.
- In the Require Check Out section, for Require documents to be checked out before they can be edited, select No.
We are now ready to create our two new pages.
To create a new page:
- On the Site Contents page, click Pages.
- In the Pages library, click the FILES tab, and then click New Document.
- On the Create Page page, enter a Title and a URL name. From the Page Layout list, select the page layout that you want to apply to the new page. In our scenario, the page layout is the newly uploaded page layout called ContosoElectronicsCategoryPageLayout.
After you click OK, the newly created page is shown in the Pages library.
In our Contoso scenario, we will also need a catalog item page. To create this page, I repeat steps 3 and 4 from the previous procedure, however for Page Layout, I select ContosoElectroniceCatalogItemPageLayout.
Our Pages library now contains two new pages: ContosoCategoryPage and ContosoCatalogItemPage.
Now that we have created these pages, the next step is to assign them to the terms that drive our site navigation.
Next blog article in this series
Stage 8: Assign a category page and a catalog item page to a term.
How to: Create a page layout in SharePoint Server 2013
Add snippets to a master page or a page layout in SharePoint Server 2013
Scenario: Create SharePoint sites by using cross-site publishing in SharePoint Server 2013