Forum Discussion

Deleted's avatar
Deleted
Apr 10, 2018

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.

  • 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.

  • 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.

    • CLHess's avatar
      CLHess
      Copper 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's avatar
      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

      • Deleted's avatar
        Deleted
        Those 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_Suarez's avatar
      Noel_Suarez
      Copper 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. 

      • ChrisWebbTech's avatar
        ChrisWebbTech
        MVP

        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's avatar
      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.

  • Kevin Belanger's avatar
    Kevin Belanger
    Copper Contributor
    You 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
  • 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.

     

  • npajak22's avatar
    npajak22
    Copper 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

Resources