Copied to clipboard

Flag this post as spam?

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


  • Ulrich Wagner Gade Ebsen 127 posts 277 karma points
    Aug 28, 2014 @ 01:28
    Ulrich Wagner Gade Ebsen
    0

    Xml PrefetchList Xpath blues..

    Hi,

    Is some like this possible in the xpath statement?

    $currentPage/ancestor-or-self::Department/Articles/*[umbraco.library:DateGreaterThanOrEqualToday(umbraco.library:split(dateRange,',')[1]]

    "dateRange" is a properry wit htwo dates seperated with a comma.

    The goal is to only list articles that are not expired.

    I considered using the Lucene PrefetchList, but the picker needs a relative starting point - ie only show articles under the current departmnet.

    /ulrich

     

     

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Aug 28, 2014 @ 11:27
    Hendy Racher
    101

    Hi Ulrich,

    Unfortunatley not, the XPath statements don't support custom extensions, but the Lucene PrefetchList could work if you use a field to store path Ids ?

    Or how about using the Xml PrefetchList with: $currentPage/ancestor-or-self::Department/Articles/* and then use a macro (Custom Label) to remove those items you don't want ?

    HTH,

    Hendy

  • Ulrich Wagner Gade Ebsen 127 posts 277 karma points
    Sep 03, 2014 @ 11:33
    Ulrich Wagner Gade Ebsen
    1

    Hi Hendy

    Absolutely brilliant...!! ;)

    I went down the macro road... I find it very, very usefull.

    Thank you so much.

    /ulrich

Please Sign in or register to post replies

Write your reply to:

Draft