What makes a page to be a news page on SharePoint Online

October 28, 2016

Yesterday our tenant got the new team news functionality. This functionality allows you to write news in your team site which gets published on the homepage or via the new news headlines web part.

Team news functionality

Team news functionality

Info: SharePoint Online "team news" begins roll out to Office 365 First Release customers - https://techcommunity.microsoft.com/t5/SharePoint-Blog/SharePoint-Online-team-news-begins-roll-out-to-Office-365-First/ba-p/22763

As I started testing out the news page functionality. I questioned myself how they achieved it, because creating a new news page redirects you to the same URL as for creating a new site page.

Info: New page URL - https://tenant.sharepoint.com/sites/Team/SitePages/newpage.aspx?Mode=Edit

Both pages also look the same:

News page and site page layout

News page and site page layout

So, as they look and feel the same, where is the difference? You would think metadata, and this in fact true, but you cannot see it from the UI. If you would check the properties from the UI, you will only see its Title and Name. Now, when you open the content type of the page which is Site Page (also for the news pages). You will see the following metadata fields:

Site page content type

Site page content type

Here you find the answer. There are a couple of metadata fields which are hidden from the UI like Promoted State and First Published Date. When you check the contents of the ASPX page. You will see a couple of differences between the two types of pages.

News page

Site page

In the news page, you can find two important differences: PromotedState = 2.00000000000000 and the FirstPublishedDate which is defined.

A site page does not contain the FirstPublishDate element and the PromotedState value is set to 0.

So, what makes a page a news page?

As it turns out, the PromotedState value needs to be set to 2 to display it via the news headlines web part. When you change the number of the site page content, it will be displayed in the news headlines web part:

Promoting a site page to a news page

Promoting a site page to a news page

In the screenshot, you can see that my site page article now gets displayed, but something seems to be wrong with the date. This is where the FirstPublishDate fits in. When you add this to the content of the site page and refresh the homepage.

You will see a similar output:

Added the publish date

Added the publish date

I hope this gave you some insights into how the new news page functionality works behind the scenes.

Comments