Copied to clipboard

Flag this post as spam?

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


  • Clare 37 posts 117 karma points
    Jan 16, 2013 @ 11:19
    Clare
    0

    XSLT list items when date has passed

    Hi,

    I'm trying to create an event archive page which only lists event items once they have passed. To list upcoming events I've used this:

    <xsl:for-each select="$currentPage/ancestor-or-self::root//EventItem[
    @isDoc and string(rEvent) != '0'
    and
    umbraco.library:DateGreaterThanOrEqualToday(./dateTime)] ">

    <xsl:sort select="dateTime" order="ascending" />

    but there doesn't seem to be an umbraco library option for date less than... (unless I'm missing something). Is there a way to list all items where date is NOT greater than or equal today?

  • Sebastian Dammark 583 posts 1407 karma points
    Jan 16, 2013 @ 11:35
    Sebastian Dammark
    100

    What if you did like this?

    $currentPage/ancestor-or-self::root//EventItem[
    @isDoc and string(rEvent) != '0'
    and
    not(umbraco.library:DateGreaterThanOrEqualToday(./dateTime))]
  • Clare 37 posts 117 karma points
    Jan 16, 2013 @ 11:47
    Clare
    0

    Thank you so much - perfect solution!

Please Sign in or register to post replies

Write your reply to:

Draft