We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25984
    • 7 Posts
    Hello All,

    I am new to MODx. I want to use Ditto to display articles added in the last 30 days starting with the most recent. Please let me know how this can be achieved.

    Thanks.
      • 26931
      • 2,314 Posts
      Hi sally,

      something like this in your Ditto call should work:
      &filter=`pub_date,@EVAL return strtotime('-30 days');,3`
      (pubishing date should be set, you can automate this with a ManagerManager rule, or take createdon instead of pub_date)
      btw. it’s better to post in the Ditto part of the forum smiley http://modxcms.com/forums/index.php?board=180.0