Forum Discussion

arine1901's avatar
arine1901
Brass Contributor
Jan 09, 2024
Solved

Change default link to search in SharePoint online

When we input the keyword in this Search box in SharePoint online,

the default link that launched is like this : 

https://domain-name.sharepoint.com/sites/site-name/_layouts/15/search.aspx/siteall?q=test

How can I change the default link from 'siteall' to 'sitenews' when launching the search in SharePoint online?
https://domain-name.sharepoint.com/sites/site-name/_layouts/15/search.aspx/sitenews?q=test 

Thank you

 

  • Hello arine1901

     

    news posts are pages, there are saved in SitePages. But news posts have a promoted state 1 or 2, you can filter this property in your query. You can find more informations in this blog from Gregory Zelfond : https://sharepointmaven.com/news-post-page-vs-sharepoint-page-in-sharepoint-online/ 

     

    Example: 

    {searchTerms} contentclass:STS_ListItem_WebPageLibrary AND RefinableString104:2

     

    contentclass:STS_ListItem_WebPageLibrary >> only webpage libraries

    RefinableString104:2 >> I have mapped ows_promotedstate to the RefinableString104

     

    For sure, you can add more properties like PATH in your query.

     

    Hope this helps.

     

    Best, Dave

Resources