Hi,
I got 2 date TV’s on the same page.
A StartDate and an EndDate for events. Some events only last 1 day, some events last many days.
On the homepage i show the newest events with a ditto call like:
[[Ditto? &parents=`10` &depth=`1` &filter=`StartDate,@EVAL return strtotime(’-1 day’);,6` &orderBy=`StartDate ASC` &tpl=`showeventstpl`]]
It should retrieve all the documents with the newest upcoming events first. When the day is over, the event is over and should be stripped from the list.
This works, but when an event starts at 25/3 untill 30/3 it will be gone from the list after 26/5 allready.
If i change the filter to:
&filter=`EndDate,@EVAL return strtotime(’-1 day’);,6`
Then it doesnt show the events who doesnt have an EndDate.
I thought the easiest solution would be to set the default value of EndDate to the value of StartDate.
Is this possible or should i manually enter the EndDate every time even if the event only last 1 day?
Maybe i’m making it myself too difficult and there is an easier solution?
Thanx for the help...