Forum Discussion
Change News Page to Site Page
Hi All,
I'm looking for a method of changing a News Page to a Site Page. These pages were created prior to the hub sites being rolled out, now they are showing up in the News sections of all pages.
I'm familiar with the Promoted State column, but I haven't been able to find instructions on how to actually change the value in that column. I've seen references to using Flow but never any instructions on actually doing that.
Any tips on this would be appreciated.
- DeletedApr 10, 2018
Ok, I finally got this to work without Using flow. Do the following.
1.Go to Site Pages on your Site.
2.Change your view to "All Items"
3.Now Click the + to add a column to view, and select Show/Hide Columns
4.Check Promoted State column and click "Apply" at the top.
5.Now Click the view drop down and Save view as
6.Name it "All Items and State"
7.Now you should be able to click "Quick Edit" and then Promoted State column will be exposed to change the value. Change the page you no longer want to be news from 2 to 0 and Click exit and your page can now be a Site page again.
- Deleted
Ok, I finally got this to work without Using flow. Do the following.
1.Go to Site Pages on your Site.
2.Change your view to "All Items"
3.Now Click the + to add a column to view, and select Show/Hide Columns
4.Check Promoted State column and click "Apply" at the top.
5.Now Click the view drop down and Save view as
6.Name it "All Items and State"
7.Now you should be able to click "Quick Edit" and then Promoted State column will be exposed to change the value. Change the page you no longer want to be news from 2 to 0 and Click exit and your page can now be a Site page again.- CLHessCopper Contributor
I tried this by when I try to change 2 to 0, it says cell is "read only"... I am a site owner. Any suggestions?
- Deleted
Ok, so I used the trick of exposing the column, saving the view, the using quick edit to change the 2 to 0 for a couple of pages.
if I add a news web part to the site where the page is located, the page doesn't show up any more! Great!
BUT! I have added a news web part to the hub site. The edited pages are still showing up at the hub level. I've deleted the web part, deleted the page its on, recreated everything...but they still show up on the hub site.
any advice for this situation? I've opened a case with our cloud support, I will update if I get helpful results from them
- DeletedThose news articles are search cached. You have to give it time for the crawl to happen but if you delete a news article it should go away I think in roughly 10 minutes or so.
- Noel_SuarezCopper Contributor
FYI - I'm curious if anyone else has tried this lately since it no longer appears to work. Dragging and dropping it from one state group to another doesn't change the site page Promoted State value.
Yes, I just did it, see gif. I'll try on targeted release to see if I can do there as well, but on standard still working.
- There are a couple ways: one option is to go to a "flat" view of the Site Pages library and use Quick Edit to change the promoted state value from 2 to 0. The other is to start with a flat view and make sure to show Promoted State. Then, group by Promoted State. You can drag a page from one group to another and that will change the promoted state.
- Deleted
Not sure what has happend but if i move the page from 0 to 2 i get a status of 200.000.000.000.000 On the same tenant different sitecollection the drag and drop works fine. Could some-one please tell me what i'm doing wrong?
Thanks in advanced.
Rgds,
Red Behari
There is a SPFx extension created by Mikael Svenson for demoting news pages. You can use this extension for your requirements.
Sample code at: Demote News to page Command
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- M365061290Iron Contributor
Deleted
We can demote or unpromote news using following list view extension
- Kevin BelangerCopper ContributorYou can use PnP PowerShell to do this by changing the PromotedState field from 2 to 0
#change to your site address
$SiteURL = "https://crescent.sharepoint.com/sites/Intranet"
#Connect to Site
Connect-PnPOnline $SiteURL -Interactive # to use web creds, replace with 'Connect-PnPOnline -Url $SiteURL -UseWebLogin'
#Get all Site pages - along with their IDs
Get-PnPListItem -List "SitePages"
#Demote News page with ID "4" to Site Page
Set-PnPListItem -List "SitePages" -Identity 4 -Values @{"PromotedState"="0"}
For reference, see https://www.sharepointdiary.com/2020/03/promote-site-page-to-news-page-in-sharepoint-online.html - Deleted
If you want to use flow you can think of below
Use Create flow button from Site Pages library and choose template When a file is created or modified in a folder .
Use Get File Metadata using path action and select folder path as SitePages
Using Update file properties Update promotedState to zero from 2 and and it should update to SitePage.
- npajak22Copper Contributor
Hello,
Have there been any recent developments in this? I setup my page as indicated in the solution here but the column is now greyed out and says it is a read-only field.
Thank you,
Nicole
npajak22 Try solution given in my above response using SharePoint JSON formatting. Let us know if it works for you.
Please consider giving a Like if my post helped you in any way.
- c00p82Copper Contributor
ganeshsanap you are amazing for sharing this - thank you so much
Start Here:
- Site Contents
- Site Pages
- Change View Option to All Pages
Turn on the Promoted State Column:
- Add this column by selecting + sign next to the last column displayed in the header
- Then select Show/hide columns
- Scroll down to Promoted State and check the box and click Apply
Add JSON:
- Go into edit in grid view
- Click promoted state column arrow - column settings - format this column
- Apply formatting to - select Promoted State
- Delete code that is there and paste this code found in link below into it
- Save - refresh page
- Click ellipsis - Demote (Change to 0:Page)
Finish It:
- THEN GO TO THE PAGE AND REPUBLISH IT TO TAKE AFFECT
https://github.com/pnp/List-Formatting/tree/master/column-samples/promotedstate-demote-news
- brewsaBrass ContributorThe column formatting solution above from @thechriskent (posted above by ganeshsanap) worked for me in a few seconds.