Forum Discussion
irshad313
Feb 18, 2025Copper Contributor
sharepoint Pnp Modern search subsites filter
Hello, I am implementing a PnP modern search, I am searching for files within one site and my query template in search result is {searchTerms} AND (Path:"https://testsite.sharepoint.com/sites/test1") withing test1 site I have 3 subsites. In search filter I want to show those 3 subsites as filter options so whenever I click on any subsite name in filter, search result will shows files only from that subsite. By default it shows files from all site including test1 site and all 3 subsites. Can anyone please help me on this?
If this needs creation of any property then how can I create I am new in shearpoint search
- KasperLarsen_dkBrass Contributor
I am not sure that you can get the sub sites as filters, but you have other options. Either use Search Verticals and a Results web part for each of the subsites, or using an approach like in this video of mine, A-Z Filter using two PnP Modern Search Results web part