Forum Discussion

Rafia2500's avatar
Rafia2500
Copper Contributor
Jun 16, 2022
Solved

Pnp Search Result Query Template... configure to show only specific items

Hi there!

I was trying to configure the pnp-search-result-web-part to show only the available sites(site names) on my tenant when a specific vertical is selected... Also in another scenario, I want the pnp-search-result-web-part to show only the list name but not the list items. Kindly help with that.... I suppose this could be achieved using Query Template but I have no idea how to do.. kindly help!

 

T.I.A  

  • Issue resolved... I tried {searchTerms} contentclass:sts_(your desire component)... for example {searchTerms} contentclass:sts_site /
    {searchTerms} STS_List_GenericList etc
  • Rafia2500's avatar
    Rafia2500
    Copper Contributor
    Issue resolved... I tried {searchTerms} contentclass:sts_(your desire component)... for example {searchTerms} contentclass:sts_site /
    {searchTerms} STS_List_GenericList etc
    • deeAlpha's avatar
      deeAlpha
      Copper Contributor
      Is there a way to not show the parent folder? I chose Cards for Handlebars/HTML layout and it shows the parent folder/document library name and then the items.
      Ex. sites/name/parentfolder
      This will show all the documents and parentfolder as one of the cards

Resources