Search This Blog

Thursday, March 3, 2011

How to filter values in a content query web part based on a query string parameter


Additional Filters in a content query web part: 

The below definitions can be viewed by clicking on the help icon beside the Additional Filters section of the Content query web part in edit mode. Most people would not have the patience to click the icon, Hence i have mentioned the details below:
  
You may also enter these tokens as filter values:

  • [PageFieldValue: field name] - uses the value of the specified field of the current page.
  • [PageQueryString: query string parameter name] - uses the value of the specified query string property of the current page URL.
  • If the page field value or query string parameter value is null, the filter will not be included in the query.
  • For date fields, enter an integer value in "Custom Value or Query" to set up a dynamic date range which will be equal to [Today] + [integer value] number of days. 

1 comment: