How to Use SharePoint 2010 Content Query Web Part (CQWP)

The Content Query Web Part (CQWP) in SharePoint 2010 enables you to query content from the current site collection and display it in a customizable ways. This helps SharePoint Administrator to provide data from other sites to the main site for the end users such as important announcements, news and other information.

In this post we will show you how to configure the CQWP as well displaying the needed fields. For the following example, you need to have a sub-site so we can read data from it and show it on the main site.

Hot Post(s) Now
Free SharePoint 2010 Web Parts
SharePoint HR

Example Prerequisites

  1. Open SharePoint site
  2. From action menu, click new site
  3. From the create dialog, select Publishing site, fill the title and the URL then click Create button
  4. In the new site, create New Page with Image on right page Layout
  5. Insert Page Image, Article Date, Byline and the Page Content
  6. From the Ribbon, select the Publish tab and click Publish button
  7. Now repeat steps 4-6 two times to create another two article pages

Configure the CQWP Query

  1. Navigate to the main site
  2. From action menu, click edit page
  3. Click Add a Web Part link
  4. Under Web Part Categories, click “Content Rollup” then select “Content Query” under Web Part group then click Add button
  5. In CQWP click open the tool pane link
  6. From tool pane in the right, expand the Query group
  7. In Source section, select “Show items from the following site and all subsites” and click browse
  8. From select site dialog, select the Article site and click OK
  9. In List Type section, select Pages Library
  10. In Content Type section, select Page Layout Content Type in “Show items of this content type group” combobox and select Article Page in “Show items of this content type” combobox
  11. Click Apply button

Configure the CQWP Presentation

Now after you successfully rolled up the articles data, it is time to do more such as grouping and sorting the articles, changing the display style and other:

  1. Expand the Presentation group
  2. Under Group and Sorting section, select Byline for Sort item by
  3. In the Fields to display section, add Page Image in Image field which will show the article image in the CQWP
  4. Also you can add Page Content in the Description field to show it in the Content query so user can read the article from the Content Query Web Part.
  5. Click OK to see the final result.

The final result should look similar to the below image (Click Image to Enlarge)

Content Query Web Part in SharePoint 2010

Download Content Query Web Part (CQWP) Guide

Name

Downloads

CQWP Web Part Guide Download
CQWP Web Part Guide Download

Hot Post(s) Now
Free SharePoint 2010 Web Parts
SharePoint HR

Comments are closed.