Using the Content Query Web Part in non-Publishing sites

Monday, May 19, 2008 6:56 AM
Microsoft MVP Logo

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.

comments powered by Disqus