2

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

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?

2

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 ---
    </xsl:for-each>
</xsl:for-each>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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