Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
I used the following script to display nodes per month. http://our.umbraco.org/forum/developers/xslt/6928-Grouping-nodes-by-Month?p=0#comment25245 ;
The result loops the month name like this:
This is the full code:
<xsl:template match="/"> <xsl:variable name="eventNodes" select="$currentPage//Agendaitem [umbraco.library:DateGreaterThanOrEqualToday(datum)]"/> <xsl:for-each select="$eventNodes"> <xsl:sort select="datum"/> <xsl:variable name="lastMonth" select="umbraco.library:FormatDateTime(datum,'MMMM')" /> <xsl:if test="not(preceding-sibling::node[umbraco.library:FormatDateTime(datum,'MMMM')=$lastMonth])"> <h2 class="dotted"> <xsl:value-of select="position()"/><xsl:value-of select="umbraco.library:FormatDateTime(datum,'MMMM - yyyy')" /> </h2> <div class="ctr-events"> <ul> <xsl:for-each select="$eventNodes[umbraco.library:FormatDateTime(datum,'MMMM')=$lastMonth]"> <xsl:sort select="datum"/> <li> <div class="info"> <div class="title"> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </div> </div> <div class="clear"><xsl:text> </xsl:text></div> </li> </xsl:for-each> </ul> </div> </xsl:if></xsl:for-each>
Does anyone knows how to show the month only once?
Hi Bas
Try having a look at this answer by Chriztian explaining some Muanchin grouping here http://our.umbraco.org/forum/developers/xslt/14952-Grouping-Using-the-Muenchian-Problem#comment68628
Also have a look at his answer in here: http://our.umbraco.org/forum/developers/xslt/17142-Simple-Muenchian-grouping
Hope this helps.
/Jan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Nodes per month
Hi All,
I used the following script to display nodes per month. http://our.umbraco.org/forum/developers/xslt/6928-Grouping-nodes-by-Month?p=0#comment25245 ;
The result loops the month name like this:
This is the full code:
Does anyone knows how to show the month only once?
Hi Bas
Try having a look at this answer by Chriztian explaining some Muanchin grouping here http://our.umbraco.org/forum/developers/xslt/14952-Grouping-Using-the-Muenchian-Problem#comment68628
Also have a look at his answer in here: http://our.umbraco.org/forum/developers/xslt/17142-Simple-Muenchian-grouping
Hope this helps.
/Jan
is working on a reply...