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 web & cloud developer with a focus on Microsoft Azure & Microsoft 365. He’s received Microsoft’s MVP award every year since 2005 and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s the founder of Voitanos and is dedicated to helping you be the best Microsoft 365 web & cloud developer. He lives with his wife & two kids in Florida.

Share & Comment