6. CQWP
• Used to aggregate content from SharePoint
lists & libraries from within the current site
collection
• Filter by content types
• Add additional columns
• Presentation styling
• Audience Targeting
7. What’s new?
• Dynamic Filters
– SharePoint 2007
• You had to subclass the CQWP to add dynamic filters
– SharePoint 2010
• Filters based off other fields on the page
• Or from a value on the QueryString
8. What’s new?
• CommonViewFields
– SharePoint 2007
• Had to export web part.
• Tweak the CommonViewFields property.
• Reimport to page to pass additional content
fields down to the XSLT for rendering.
– SharePoint 2010
• Now exposed in the CQWP’s Editor part
9. Controlling the Presentation
• Use existing Styles from the style gallery
• Levels are set using the presentation section
in the tool pane
• Create Custom XSL
– Conditional Formatting
– Key Performance Indicators
– Calendar displays
11. Building the Query
• PageFieldValue
– Token allows to specify field on page layout and
dynamically replaces value of filter with current page’s
field value
• PageQueryString
– Use URL query string for a value to use in Query
– Example
• Add Query String value to URL (&NewsCategory=Sports”)
and set the CQWP’s query to return pages where the News
Category field is equal to “Sports”
13. Building the Query
• Supports filtering over the Enterprise
Keywords columns and the “All Tags” column
– Allows to look for any
managed metadata
tag on a queried item,
regardless of
which metadata field
on the item contains
the tag.