Sharepoint old classic sites vs modern

Fangueiro, Sergio 1 Reputation point
2021-03-04T12:04:16.367+00:00

Hello all.
We are on a changing from subsites to sites.
We have one subsite called workspace, that serves all teamsites and it has a query on workspace site page like: path:"https://contoso.sharepoint.com/Workspace" contentclass:STS_Web Site<>{Site.URL} UrlDepth<3 and it shows only the teamsites based on permissions that users have access. (Audiance targetting)
My question is: setting up a new sitepage workspaces and after promoting all sites, on highlight content how can I add/or filter the path script to show same sites based on permissions like we have now? Most viewed pages not fits, cannot present content as well.
If anyone can help, i really appreciate

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,628 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Allen Xu_MSFT 13,776 Reputation points
    2021-03-05T06:28:27.26+00:00

    Hi anonymous user,

    The screenshot below shows several subsites are displayed on a classic page using content search web part. Per my understanding, are you meaning to display those subsites on a modern page using Highlighted content web part?
    74530-image.png
    If yes, please take a reference to the following steps:

    • Add Highlighted content web part on a modern page.
    • Click "Edit web part"74616-image.png.
    • Select "Custom query" option.
      74623-image.png
    • Select "All sites" in Source.
      List item
    • Put query script in Query text textbox and click "Apply".
      74702-1.png
    • Enable audience targeting.
      74673-image.png
    • For other customization, please refer to this aricle: Use the Highlighted content web part.

    After completing this, Subsites can be displayed on a modern page like what it is on a classic page.
    74610-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.