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 everybody,
I try to sort on Date.
I try it like this:
<!-- The fun starts here --> <ul> <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <b>Publicatie Datum:</b> <xsl:value-of select="umbraco.library:FormatDateTime(./publicatieDatum,'dd/MM/yyyy')" order="ascending"/>
THX,
Niels
Hi Niels,
You use a sort instruction immediately after the for-each to do that, like this:
<ul> <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']"> <xsl:sort select="publicatieDatum" data-type="text" order="ascending" /> <li> <b>Publicatie Datum:</b> <xsl:value-of select="umbraco.library:FormatDateTime(publicatieDatum, 'dd/MM/yyyy')" /> </li> </xsl:for-each> </ul>
This way, you can use more than one sort option, e.g., you could sort first by date and then by name (so that entries from the same date would be sorted alphabetically):
<xsl:sort select="publicatieDatum" data-type="text" order="ascending" /> <xsl:sort select="@nodeName" data-type="text" order="ascending" />
/Chriztian
Thanks Chriztian
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
sort on date
Hi everybody,
I try to sort on Date.
I try it like this:
THX,
Niels
Hi Niels,
You use a sort instruction immediately after the for-each to do that, like this:
This way, you can use more than one sort option, e.g., you could sort first by date and then by name (so that entries from the same date would be sorted alphabetically):
/Chriztian
Thanks Chriztian
is working on a reply...