Home
About Us
Advertise
Printable version
Content Query Web Part Enhancements in SharePoint 2010
By Randy Drisgill
November 30, 2010 —
(Page 1 of 2)
I’m writing this article over my Thanksgiving holiday so I might as well take a moment to give thanks for things that have been awesome in 2010. I have many things I should be thankful for, like family and friends or perhaps that this is the last official thing I need to write in 2010 (for more info on this, here’s a shameless plug for
my new book on Amazon
) but since this is a SharePoint article, I’ll focus on something that’s been improved in SharePoint 2010.
The Content Query Web Part is one of the “Swiss Army knives” that comes with SharePoint Server. It has always been very helpful for rolling up lists and pages easily. For SharePoint 2010, there are a couple new features that make it even more useful.
New Query Filters
Filters have always existed for the Content Query Web Part, but SharePoint 2010 adds a couple of new options that are extremely powerful. Rather than filtering a column on a specific value, you can now filter by either PageFieldValue or PageQueryString.
PageFieldValue filters the Content Query Web Part by other fields on the page. This means you can place the same Web Part on several pages and see different items in the rollup based simply on the content of a field on that page. The syntax for this filter would be [PageFieldValue: field name].
Alternatively, PageQueryString filters the Content Query Web part by parameters that are sent over the URL. The syntax for this filter is [PageQueryString: query string parameter name]. This filter can be quite useful for making a rollup page seem more interactive than usual.
For instance, you could create a Content Query Web Part that is filtered by a PageQueryString of “category,” and then you could create a page with links that pass over different query strings on the URL like this: <a href="cqwp_page.aspx?category=2">. The Content Query Web Part will then filter results and only show those that match the category that is sent over on the URL.
Next Page
Pages
1
2
Share this link:
https://sptechweb.com/link/34996
Related Articles
Customizing SharePoint Online Using SharePoint Designer, Part 1
Once you get a handle on SharePoint Online, the question becomes: How can I modify it to suit my needs. First of two parts.
Planning your search strategy is more important than ever
Enabling everyone in your organization to find content within seconds creates big ROI potential.
More on the Content Organizer in SharePoint (Second of three parts)
Content Organizer can partition libraries based on their size