Quote from: halfnium at Aug 24, 2013, 10:23 AM@ecadre, I may have done what you wish to do. Please see https://forums.modx.com/thread/?thread=86185#dis-post-475573
Actually, you seem to have answered a question I hadn't asked yet ... that is, listing events from the current date to some time into the future as many be needed for a front page "widget" type thing.
Brilliant, MODx forum users are mind readers too :-D
Thankyou.
PS.
It works. This will give a list of upcoming gigs for the front page.
First create a new snippet called curDate with the following contents.
<?php
return date('Y-m-d H:i:s')
Then use it thus for an upcoming dates "widget" in your home page.
[[!getResources? &parents=`2` &showHidden=`1` &depth=`1` &tpl=`upcominggiglisttpl` &sortbyTV=`gigdate` &sortdirTV=`ASC` &includeTVs=`1` &processTVs=`1` &tvFilters=`gigdate>=[[curDate]]`]]
If you wish to limit it to, say, the next 3 months (approx, using unix time)
[[!getResources? &parents=`2` &showHidden=`1` &depth=`1` &tpl=`upcominggiglisttpl` &sortbyTV=`gigdate` &sortdirTV=`ASC` &includeTVs=`1` &processTVs=`1` &tvFilters=`gigdate>>[[!curDate]],gigdate<<[[!curDate:strtotime:add=`7889400`:date=`%Y-%m-%d %H:%i:%s`]]`]]
Excellent stuff, I've got just about everything I wanted in listing terms
[ed. note: ecadre last edited this post 13 years, 1 month ago.]