Thank you. Looks like the relevant discussion since 10/09 has migrated there.
What is better manners and more effective, to reproduce my question there or to point at it on this thread?
I did go there, found and described a workaround based on kp52’s research, and pointed back at this thread.
I looked just like that in 1964.
Great tutorial, thanks guys:)
Just wondering weather it’s possible to check weather the date is past date and if it’s past date then not to show it with ditto.
Certainly it is possible to condition presentation based on the current date: Each document carries built-in publishedon and createdon date variables -OR- you can define your own date-related template variable(s) -OR- you can test on the [+date+] that Ditto provides.
Short of hacking into the supplied version of Ditto, I do not see how you could get Ditto itself to conditionally present on your behalf. Hacking supplied Resources opens up support issues to be avoided. (Glad to be shown that I was wrong by the next couple of posts below.)
I looked just like that in 1964.
you can use dittos &filter-parameter to filter out all resources which are in the past.
Right, so filter works like this: field,criterion,mode
My field is my date TV: news_date
Criterion is: current date (how do I get it to Ditto call?)
Mode is 4: is greater than the criterion (>)
So, the only question is how to get current date to Ditto call?
you can try:
&filter=`news_date,@EVAL return time();,3`
you can also use a snippet, which gets the time you want:
&filter=`news_date,[[getMyTime]],3`