3

I want to limit a query in a Content Search Web Part to just the Pages library of the current site (exclude any sub-sites). Is there anyway to correctly concatenate "Pages" to the query variable {Site.URL}?

Here's what I've tried with no success (0 results returned):

path:{Site.URL}Pages

path:{Site.URL}/Pages/*

path:{Site.URL}/Pages

It only works when I hard code the path which I don't want to do:

path:"https://something.sharepoint.com/Pages"
2

I needed to add "\" before the "S" in Site.URL. Not sure why this is but I may investigate later.

{\Site.URL}/Pages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.