Forum Discussion
irshad313
Feb 13, 2025Copper Contributor
Shearpoint PnP Modern Search
In shearpoint PnP modern search when I put any text in search box I want result to appear from only one site how should I customize this change in my current solution to get my desired output
- Feb 13, 2025
Hi irshad313
you can use the Path property in your query template, as example only from the site "MSTEvents":
{SearchTerms} Path:“https://mehr365.sharepoint.com/sites/MSTEvents/“
You can see more details in my blog post: https://www.mehr365.com/gezielt-inhalt-suchen-mit-der-eigenschaft-path/
Best, Dave
irshad313
Feb 13, 2025Copper Contributor
Hello DaveMehr365 Thanks a lot It worked, I have one more query please if you can answer, I want to implement two verticals for one search result web part scenario would be like if I select one option from 1st vertical then then I will three more options on second vertical and in search result web part the result with combination of both verticals will appear is there any way we can do this?
DaveMehr365
Feb 13, 2025MVP
Hi irshad313
not sure, what you want to do with two verticals and one results...and what you mean with "options"....
You can also create two verticals and two search results webparts on one page, depending on the verticals you can display the results. Here is a scenario article: https://microsoft-search.github.io/pnp-modern-search/scenarios/Create-a-search-page-with-verticals-within-the-same-page
Best, Dave