I am attempting to migrate my website from the latest version of Evolution to the latest version of Revolution and in almost every respect I have found revolution far superior. As my site has 1500+ published pages and 2500+ pages in total I use ditto extensively to filter and output results and I found the filter command excellent. I also use the month and year filter to provide archives of the reviews available on the website however this is where I am finding problems with Revolution.
The lack of Ditto has become a big issue and while I know that getResources is being used as a replacement, it doesn’t seem to offer the same functionality as Ditto did as far as filtering results goes. The &tvFilters doesn’t work very well and there doesn’t seem to be any way I can filter by "publishedon" month / year at all.
I don’t want to use the Archivist as it doesn’t have the functionality I require, has anyone got any experience of effective filtering using getResources? For me Ditto was one of the best things about Evolution and it seems very strange to me that this hasn’t been replicated for Revolution.
Can anyone help with this issue?
Thanks for the help, can’t get Rowboat to work and can’t see how I would get an output filter to do it either.
Does anyone have experience of using the &where in getResources to filter by date - ie using the "publishedon"?
Thanks for the help Opengeek however it doesn’t seem to work.
-
☆ A M B ☆
- 104 Posts
The date string stored for published on isn’t a Unix timestamp, so it might have trouble comparing the integer from the given "time" snippet to the publishedon date string. You’ll probably have to do something like [[!time:date=`format`? &string=`3 months ago`]] which would do a string compare, but if the date is in the correct format (year, month, day) it should work properly. I can’t remember the format off the top of my head, but if you output the publishedon date, that should give you a pretty good idea.
-
MODX Staff
- 10,725 Posts
The dates are stored in the database as integers, and are unix timestamps. This works perfectly for me in my testing. You’ll have to provide more information.
you need to use &input in your snippet call instead of &string or change $input to $string in your snippet