The Content Query Web Part (CQWP) is a very handy tool in SharePoint Server Standard and SharePoint Server Enterprise. It isn’t available in default installations, however. This post will briefly describe how to add the web part to a SharePoint Server web page, and what to do if the Content Query Web Part is missing.
The CQWP has a number of uses. For one, it can allow you to create an aggregated list based on multiple lists or libraries, either from within a single site or from across a site collection, as we show in our courses Introduction to SharePoint Server 2010 and Designing SharePoint Document Management and Records Management Systems in SharePoint 2010. For another, it can also be used to display items from a single list or library on a different site within a site collection. For example, you might have a master Contact list on the top-level site in a site collection, but need to display a filtered version of that list on a sub site – you can do that through the Content Query Web Part.
You can add the Content Query Web Part (often called CQWP for short) to a SharePoint page by going into Edit mode (Site Actions > Edit Page), then click the Insert tab and choose Web Part. Click the Content Rollup folder and select Content Query Web Part.
So What Do I Do If My Content Query Web Part Is Missing?
There is a SharePoint site collection administration detail that sometimes causes a problem: A user will go to add it the web part to a page and find that the Content Query Web Part is missing. They are sure they are in the Standard or Enterprise edition of SharePoint (as opposed to Foundation), but the web part simply isn’t there. Why? And how do you make it available?
The answer lies in Site Collection Features. The Features are a series of options in SharePoint that can be turned on or off. Some are on by default when a site collection is created; others have to be activated before they can be used. Be aware that sometimes the name and description of a feature doesn’t tell you everything that the feature controls. In this case, the CQWP is part of a bundle of features called SharePoint Server Publishing Infrastructure. Generally we think of Publishing in SharePoint as a way to enable content management, including combining content with specific page layouts. It’s a feature commonly used by public web sites meant to provide large amounts of information (or frequently changing information) in formats similar to a newspaper or catalog. Activation of the Publishing Infrastructure is necessary, however, to make the CQWP (and certain other web parts) available for use.
A user with Full Control or Site Collection Administrator permissions can take the following steps to activate the Publishing Infrastructure:
- Go to Site Actions > Site Settings
- In the Site Collection Administration section, click Site collection features
- On the Site Collection Features page, click the Activate button next to SharePoint Server Publishing Infrastructure.
Once this feature has been activated, the Content Query Web Part should then be available throughout the Site Collection.
NOTE: In addition to Site Collection Features that may be activated or deactivated, there are Features that may be turned on or off on each site; this includes the top-level site. If you want to use the full set of Publishing tools, you must also activate the SharePoint Server Publishing site feature on each site/subsite where you wish to use them.
- Go to Site Actions > Site Settings
- In the Site Actions section, click Manage site features
- On the Site Features page, click Activate for SharePoint Server Publishing.
Keep this tip in mind whenever you can’t find a tool or feature in SharePoint – it might just be part of a Site Collection Feature or Site Feature that needs to be activated. In addition, there are some features that are enabled at the server level, so you may need to contact your server administrator if you can’t find it in the Site Collection or Site lists.
If you’d like to learn more about configuring and customizing your SharePoint site, check out our full roster of SharePoint training classes.