I’m sure this is a simple fail on my part. But going from ditto to getresources I can’t manage to get content working.
I started with this:
[!Ditto? &parents=`65` &tpl=`ditto_events` &orderBy=`newsdate ASC` &dateSource=`newsdate` &filter=`newsdate,@EVAL return strtotime("now");,3`!]
tried what I figured would be this:
[[!getResources? &parents=`65` &includeTVs=`1` &tpl=`ditto_events` &sortby=`newsdate` &sortdir=`ASC` &dateSource=`newsdate` &filter=`newsdate,@EVAL return strtotime("now");,3`]]
I’m sure it might be the &filter or &dateSource but I haven’t figured out what properties to use instead.
Thanks for any help.
-
☆ A M B ☆
- 2,475 Posts
I’m not sure if you can use the @EVAL like that... have you tried hard-coding values for those parameters or omitting those parameters entirely? That’d help you isolate what’s causing the problem at least...
-
☆ A M B ☆
- 318 Posts
Also, depending on what’s in your template, you may want to set &processTVs=`1` and &tvPrefix=``, and to get the sorting to work you’ll want to use &sortbyTV and &sortdirTV instead of &sortby and &sortdir. Also, set &sortbyTVType=`datetime` and make sure the datetime values stored in your database are in the standard mySQL format starting with the year - for some reason mine were wrong when I upgraded and it took me quite some time to figure out why it wasn’t sorting correctly.
Thanks for the replies, im sure once I dig deep I might find a solution. Kind of silly a simple ditto line has to be so complex using getresouces.