In a recent project I was asked to consult in, the team needed to create sub site/s for news or events. Developing for re-usability in SharePoint is something I find is lacking quite a bit in Development teams. Below I outline the solution I worked out for the project, that is also now a template that the Team can use in any similiar project. I will explain not only how to do it step by step but also continue to make this page layout as the default page layout of a publishing sub site. After that, make a content query in the root site to preview the news articles.

Finally, I will be using variation to create a similar publishing sub site in other languages. Step by step creation of News Page Layout using Content Type in SharePoint 2013.

How to Create a publishing sub site for news and using variation to creating the same site to other languages

  • Firstly open Visual Studio 2013 and a create new project of type SharePoint Solutions…”SharePoint 2013 Empty Project”.


  • Create new SharePoint 2013 empty project
  • As we will deploy our solution as a farm solution in our local farm on our local machine.

Note: Make sure that the site is a publishing site to be able to proceed.


  • Deploy the SharePoint site as a farm solution
  • Our solution will be as the picture blew and we will add three folders for “SiteColumns”, “ContentTypes” and “PageLayouts”.


  • SharePoint solution items
  • Start by adding a new item to “SiteColumns” folder


  • Adding new item to SharePoint solution
  • After we adding a new site column and rename it, add the following columns as we need to make the news layout NewsTitle, NewsBody, NewsBrief, NewsDate and NewsImage.


  • Adding new item of type site column to the solution
  • Then add the below fields and you will note that I use Resources in the DisplayName and the Group.

Collapse | Copy Code

After That

  • Create Content Type, we will be adding new Content Type to the folder ContentTypes


  • Adding new item of type Content Type to SharePoint solution
  • We must make sure to select the base of the content type “Page”.


  • Specifying the base type of the content type
  • Open the content type and add our new columns to it


  • Adding columns to the content type
  • Open the elements file of the content type and make sure it will look like this code below

Note: We use Resources in the Name, Description and the group of the content type.

  •  Add new Module to the PageLayouts folder. After that, we will find sample.txt file, then rename it “NewsPageLayout.aspx”


  • Adding new module to SharePoint solution.
  • Add the code below to this “NewsPageLayout.aspx”.
  • Don’t forget to add the Resources folder, then add the resource file with the name “SPWorld_News.resx” as we used it in the previous steps and add the below keys to it.
    • News : News
    • NewsBody : News Body
    • NewsBrief : News Brief
    • NewsContentType : News Content Type
    • NewsContentTypeDesc : News Content Type Desc.
    • NewsDate : News Date
    • NewsGroup : News Group
    • NewsImage : News Image
    • NewsPageLayout : News Page Layout
    • NewsTitle : News Title
  • Finally, deploy the solution.
  • The next steps will explain how we add the “news content type” to the page layout through SharePoint wizard. We will do these steps pragmatically in the next article.Note: We will do the steps from “A” to “D” pragmatically in the next article without the need to do it manually from SharePoint.


  • Go to Site Contents then Pages , Library, Library SettingsOpening library setting of the page library
  • Add the news content type to the page layout


  • Adding existing content type to the pages library then,


  • Selecting the content type to add it to pages library
  • Go to Pages Library, Files, New Document, select News Content Type


  • Adding new document of the news content type to pages library
  • Write the page title


  • Creating new page of news content type to pages library.
  • Open the page to edit it. Pages library contains new page of news content type


  • Now we can see the page Layout after we add the title, Body, Brief, date and image. Finally click Save the news