I'm looking to filter items in a Content Query Webpart by URL, e.g. URL contains this particular string. URL is not available in the list of fields though. Specifying 'FilterField1="URL"' in the source code also does not work. Adding URL to CommonViewFields makes no difference.

My WebPart points to a Document library with mostly doc files and images. Is there a way to do this using the WebPart filter?

I know I could conceivably filter in xslt (because the URL is available here), but it would be slower, plus I need the top 10 items that match the filter.

1 Answer 1


The CQWP is already setup with this ablity. When setting up your filters in the web part, select the column you are filtering on and then input "[PageQueryString:Param1]" putting your parameter in place of Param1.

See image below for example, I am filtering based on the Account and have "?Account='NameOfAccount'" in the URL.

CQWP Additional Filters Options

  • This is not what I need. I need to filter by the url of the items being loaded in the CQWP. E.g. all items the url of which contains ".xlsx" . Commented Sep 22, 2016 at 7:25
  • Then I'd maybe try using the Content Search of Search Results web part. You can use the path filter
    – anonymous
    Commented Sep 22, 2016 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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