Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kasper 9 posts 29 karma points
    Jan 31, 2011 @ 15:14
    Kasper
    0

    XSLT: Sorting on 2 dates

    hi

    Is there anyway to sort on 2 different dates?

    Lets say i have about 80 posts in umbraco that only contain the @createdDate,
    But after an update on the system. The new added posts got a new field that can contain a date you deside your self..

    So now i have 2 places where a date can come from.... How can i, in XSLT, sort on both dates so they are displayed in the right order?

  • Happyfanaticsalsero 59 posts 81 karma points
    Jan 31, 2011 @ 15:36
    Happyfanaticsalsero
    0

    Depends... if you're using an xsl:for-each, you can use an xsl:sort right underneath and in the select parameter of the sort you use a concat of your two fields.

  • Happyfanaticsalsero 59 posts 81 karma points
    Jan 31, 2011 @ 15:37
    Happyfanaticsalsero
    0

    If you want to use either date, you will need to divise your own way to give some sort of "order to them" and use that in the concat / xpath

     

  • Happyfanaticsalsero 59 posts 81 karma points
    Jan 31, 2011 @ 15:40
    Happyfanaticsalsero
    0

    Not sure if you might use a union in the sort parameter though, that might also be what you're after.

Please Sign in or register to post replies

Write your reply to:

Draft