Book Image

SharePoint 2013 WCM Advanced Cookbook

By : JOHN CHAPMAN
Book Image

SharePoint 2013 WCM Advanced Cookbook

By: JOHN CHAPMAN

Overview of this book

Table of Contents (19 chapters)
SharePoint 2013 WCM Advanced Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 Module (for example, PageLayouts).

  5. Click on Add.

    Tip

    Since both master pages and page layouts are added to the same SharePoint library, they could both exist in the same module.

  6. Delete the Sample.txt file in the PageLayouts module.

  7. Right-click on the PageLayouts...