SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a SP2010 site that we are making extensive use of the CQWP (Content Query Web Part) on. When I point the CQWP at a specific list it displays description value fine. The problem is when I point it at a hierarchy of SPWebs and configure it to rollup all items of type Calendar. When I do this all data comes through fine except for Description, which is very odd. I tried using internal field name too it doesn't seem to make any difference.

So my question is how do I get CQWP to render description field from multiple calendar lists?

<xsl:template name="MyEventStyle" match="Row[@Style='MyEventStyle']" mode="itemstyle">
<div class="webpart-item">
    <span class="tooltip-event-selector"><xsl:value-of select="@Title"/></span>
  <p class="date"><xsl:value-of select="ddwrt:FormatDate(@EventDate, 1033, 1)" /></p>
  <div class="webpart-item-content">
    <xsl:value-of disable-output-escaping="yes" select="@Description" />
        <xsl:attribute name="href"><xsl:value-of select="concat('/HomePageFeed/events/calendar.aspx?IsDlg=1&amp;CalendarDateIs=', ddwrt:FormatDate(@EventDate, 1033, 1))" /></xsl:attribute>
        <xsl:attribute name="class">dialog-pop</xsl:attribute>
  <div class="hidden">
    <div class="tooltip-event-content">
      <div><strong>Event Information</strong></div>
      <div><xsl:value-of select="ddwrt:FormatDate(@EventDate, 1033, 1)" /></div>
      <div><xsl:value-of select="ddwrt:FormatDate(@EventDate, 1033, 4)" /> - <xsl:value-of select="ddwrt:FormatDate(@EndDate, 1033, 4)" /></div>
      <div><xsl:value-of select="@Description" /></div>
share|improve this question
So does this render the description fine when you point the CQWP at one specific calendar? When you do the rollup, do you select a content type, or let it pick from all content types? – James Love May 3 '11 at 18:30
Yes it does when pointed at one specific calendar. I've tried specific content types and all content types and it doesn't seem to make a difference. – James May 3 '11 at 19:30
Right, does anything come through at all, or nothing? (ie: some of the lists' data or none?) – James Love May 3 '11 at 19:43
Yes everything else comes through except description title, dates etc. I'm using a custom item style defined in ItemStyle.xsl I updated my post with this code. – James May 3 '11 at 21:37
up vote 3 down vote accepted

I was able to get this working by changing the DataMappings, and DataMappingViewFields. The values in these fields are very sensitive and a space or semi-colon in the wrong place will break it. I've posted what worked below, hopefully this will save someone else two days of misery!

<property name="DataMappings" type="string">Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|LinkUrl:|Description:{9da97a8a-1da5-4a77-98d3-4bc10456e700},Comments,Note;|ImageUrl:{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},EncodedAbsThumbnailUrl,Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},PublishingRollupImage,Image;|EndDate:{2684f9f2-54be-429f-ba06-76754fc056bf},EndDate,DateTime;|EventDate:{64cd368d-2f95-4bfc-a1f9-8d4324ecb007},StartDate,DateTime;|</property>

<property name="DataMappingViewFields" type="string">{b9e6f3ae-5632-4b13-b636-9d1a2bd67120},Computed;{543bc2cf-1f30-488e-8f25-6fe3b689d9ac},Image;{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;{9da97a8a-1da5-4a77-98d3-4bc10456e700},Note;{64cd368d-2f95-4bfc-a1f9-8d4324ecb007},DateTime;{2684f9f2-54be-429f-ba06-76754fc056bf},DateTime;</property>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.