Using the Content Query Web Part in non-Publishing sites

In this blog post, I compare the Content Query Web Part (CQWP) & Data View Web Part (DVWP) in SharePoint to use CQWP effectively.

While I’m on this support kick, here’s another useful nugget…

People commonly ask if they can use the Content Query Web Part (CQWP) in non-Publishing sites. Not surprising as it is one of the most powerful, performant and flexible Web Parts out there. I’d venture so far as it’s in a neck-&-neck race with the Data View Web Part (DVWP) in terms of being the most useful. While the CQWP has the DVWP on performance, the DVWP excels in the fact it is included in WSS 3.0, is easy to configure & customize via SharePoint Designer 2007 and that it has a multitude of data connection options. But back to the CQWP…

First, you need to have MOSS installed on the server to get the CQWP as its located in the Publishing namespace. The CQWP leverages some XSLT files that are provisioning into the /Style Library when Publishing sites are created… more specifically when the Publishing Features are activated. There are ways to get around this though.

OK, so you’ve got a Publishing site collection created and within that site collection you’ve got a Team Site. It is on this Team Site you want to use the CQWP. You’ll quickly see it works for the most part, but a few things break down. Specifically RSS feeds on the CQWP’s result set don’t work as expected… in fact they error out.

While you can get it to work sometimes (arguably most of the time), know that MSFT does not support using the CQWP in a site that does not have the Publishing Features activated.

Andrew Connell
Developer & Chief Course Artisan, Voitanos LLC. | Microsoft MVP
Written by Andrew Connell

Andrew Connell is a full stack developer who focuses on Microsoft Azure & Microsoft 365. He’s a 20+ year recipient of Microsoft’s MVP award and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s mission is to help web developers become experts in the Microsoft 365 ecosystem, so they can become irreplaceable in their organization.

Share & Comment