Forum Discussion
Mike Jansen
Jan 10, 2017Iron Contributor
Sharepoint search box web part - results only current site
I thought this would be easy but I can't find is out. On a site I use the (standard) search box web part. When I use this it returns results from the whole site collection. I do not want that. I onl...
Jan 10, 2017
Hi Brent Ellis,
Does that work?
Isn't Site.Url using the Site of the search results web part? Therefore If all search boxes on many sites all need to lead to the same search results page then that wouldn't work. you would get results from where the search result page has been created.
Brent Ellis
Jan 10, 2017Silver Contributor
Ah thx, missed that point, ya, we have always resorted to hard-coding the Paths and -Paths, and using the QueryStrings like Peter mentioned, less trouble than its worth.