Shawn,
I've had a look at what you have referenced, this is exactly what I am looking to do - insert an extra div class if publishedon is greater than today's date -30 days, using the following code:
strtotime snippet:
<?php
/* stringToTime snippet */
return strtotime($input);
[[+publishedon:gt=`[[!strtotime? &input=`-30 days`]]`:then=`event old`:else=`event new`]]
When getResources is cached it defaults to first conditional value. When uncached it works for the first resource, then all other revert to first conditional value.
Even when I use directly within a template resource (not a getResources call) using the following:
getNow snippet:
<?php
// last month
return mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
[[*publishedon:strtotime:lt=`[[!getNow]]`:then=`event old`:else=`event new`]]
I still get the first conditional value?
Stumped?