Content Query Webpart fun!

I’ve been poking around an existing web part and have been having real troubles in pulling fields from a SharePoint List. I found this article extremely useful and basically found that this XSLT snippet saved me hours of debbugging:

This basically outputs all the fields being parsed from the query in the XML which can be transformed by the XSLT. If there are fields missing from the list, as in my case, you actually need to customise the Content Query Web Part using CAML. This is also explained by exporting the webpart file and then editing the ‘CommonViewFields’ property element in the file. This took three hours of debugging to get to the bottom especially with the internal name madness! Heather Soloman has a great explanation of the best way to get to the Internal Names of the fields.

I also wrote some quick code to inspect the sites and then list out the fields with Title’s and InternalName’s for a specific one:

One thought on “Content Query Webpart fun!”

  1. Well , the view of the passage is totally correct ,your details is really reasonable and you guy give us valuable informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free new balance outlet and I find there are so much good information we new balance outlet can learn in this forum!

Leave a Reply