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

I need to diplay the result of my content query webpart as follows:
Date modified 1
Date modified 2

I know you can't do a group by on the last modified date in de content query webpart. And to be frank, I really don't want to mess up my content type by using the solution that was given here (no offense, i just like a clean content type).

Is there anyway I can do the same using my custom XSL file?

share|improve this question

You can group your items using Muenchian Method:

Put this line outside of the xsl templates:

<xsl:key name="ByDate" match="Row" use="@YourDateColumn"/>

And draw your items like this:

<xsl:for-each select="//Row[generate-id() = generate-id(key('ByDate', @YourDateColumn)[1])]">
    --- Draw group header ---
    <xsl:for-each select="key('ByDate', @YourDateColumn)">
        --- Draw item ---
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.