Show Site Hierarchy in Webpart
-
07-01-2021 - |
Question
Is there a way to show a site hierarchy in perhaps a custom web part within SharePoint? Ideally, I would like the list of links to be updated dynamically when a new subsite is created.
Something simple like a list which showcases where you currently reside within a Site Collection i.e.
Parent Site
- Team Site 1
- Subsite 1
- Subsite 2
- Team Site 2
- Subsite 1
- Subsite 2
Could you use a Content Search to achieve this? Just brainstorming and wanting to see if it is possible to do NOT in the quick launch.
La solution
There is a Keyword filter
in Content Search Web Part
to return only sites
But unfortunately, it will not provide you the desired result as Site Hierarchy.
Alternatively, you can use Table of content
web part that available in Publishing site, but it will also show the lists and documents libraries besides the sites and subsites! here workaround but looks like not working :(