Forum Discussion
Wagner Cox
May 21, 2019Copper Contributor
How to display only subsites under a site collection using highlighted content web part?
Hello all, Before, I've used the search results web part to display all my subsites under a site collection. Now, I'm in the process of "modernizing" all the sites and I like to display a list of...
- May 22, 2019
Hi Wagner Cox ,
You should be able to use the Highlighted content Web Part to achieve this using the following settings:
Content
Source: This site collection
Type: All
Document type: Any
Filter and sort
Filter: Managed property
Find a managed property: content
Managed property name:
- ContentClass
- Equals
- STS_Web
Cheers,
Grant.
May 22, 2019
There isn't a way to my knowledge to get subsites, all the modern web parts are built around top level site collections as subsites haven't been recommended to use in awhile on SharePoint online.
You'll have to look for a custom spfx extension to deploy (easy to do) to accomplish this. There is a content search web part clone that might fit the bill here: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-content-query-webpart
You'll have to look for a custom spfx extension to deploy (easy to do) to accomplish this. There is a content search web part clone that might fit the bill here: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-content-query-webpart