Including page layouts in a SharePoint solution

Page layouts included in a SharePoint solution require additional data to be added to their library properties to associate them with the page layout content type. In this recipe, we will include a copy of the BlankWebPartPage.aspx page layout that we have renamed Tacoma_BlankWebPartPage.aspx with the appropriate properties. You can download a copy of BlankWebPartPage.aspx from the web interface or with SharePoint Designer.

How to do it...

Follow these steps to include a page layout in the solution:

  1. From the Solution Explorer pane in Visual Studio, right-click on the project name.
  2. Click on Add and then select New Item.
  3. Navigate to Visual C# Items | Office/SharePoint and select Module.
  4. Give a name to the ...

Get SharePoint 2013 WCM Advanced Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.