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
Is there a way to something similar to this to get the distinct years for published nodes?
<xsl:variable name="list" select="umbraco.library:GetXmlNodeById(10)//* [name() = 'NewsItemDoctype']" /><xsl:variable name="uniquelist" select="$list//umbraco.library:FormatDateTime(@createDate, 'yyyy')[not(.=following::umbraco.library:FormatDateTime(@createDate, 'yyyy'))]"/><xsl:for-each select="$uniquelist"> <xsl:value-of select="."/></xsl:for-each>
This worked for me:
<xsl:variable name="years" select="$currentPage/node[not(preceding-sibling::node/data [@alias = 'issueYear'] = data [@alias = 'issueYear'])]/data [@alias = 'issueYear']" />
I think this is a case for the so-called Muenchean method. Personally, I would just write an XSLT extension too much logic for XSLT to handle really.
+1 for Sebastiaans suggestion. When first starting with Umbraco I ended up with a very messy XSLT and refactored that to a single human readable line in c# :P
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
get distinct years based on @createDate
Is there a way to something similar to this to get the distinct years for published nodes?
This worked for me:
I think this is a case for the so-called Muenchean method. Personally, I would just write an XSLT extension too much logic for XSLT to handle really.
+1 for Sebastiaans suggestion. When first starting with Umbraco I ended up with a very messy XSLT and refactored that to a single human readable line in c# :P
is working on a reply...