We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13730
    • 149 Posts
    Modx version : 2.2
    getResources : 1.4.2

    - parent id 12
    - event01
    - event02
    - event03
    - event ...n

    TV : «dateEvent» for the date of the event

    Snippet «todayDate» to get the date of the current day

    I want to display the events to come, ie greater or equal to date date of the current day.


    I use this getResources call and I got no results

    [[!getResources? &parents=`12` &tpl=`event-coming` &limit=`3` &processTVs=`1` &includeTVs=`1` &includeContent=`1`  &tvFilters=`dateEvent:strtotime>=[[!todayDate]]` &sortbyTV=`dateEvent` &sortdirTV=`DESC` &hideContainers=`1` ]]


    First, is it logical to use tvFilters this way in getResources?

    Your solutions are welcome.

    Thank for your help

    [ed. note: jber last edited this post 12 years, 2 months ago.]
      • 4172
      • 5,888 Posts
      try this:
      &tvFilters=`dateEvent>=[[!todayDate:date=`%Y-%m-%d`]]`


      Or let your snippet todayDate return the formatted date-string
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 13730
        • 149 Posts
        Thank Bruno17, your solution is working very well.

        You make my day.