Summary
My goal is to use getResources to display the next three items on the website from today’s date. I would like to use the published-on timestamp for this. Only one parent is used as the source.
Step to reproduce
My current source code looks like this:
[[getResources?
&parents=22
&tpl=aktuellesTpl
&showHidden=1
&limit=3
&includeTVs=1
&where={"publishedon:>=":"[[!currentDateTime?]]"}
&sortbyTV=publishedon
$sortdirTV=ASC
&debug=true
]]
currentDateTime returns the current datetime:
return date(‘Y-m-d H:i:s’);
That’s the SQL out of my log file:
SELECT modResource.id, modResource.type, modResource.pagetitle, modResource.longtitle, modResource.description, modResource.alias, modResource.link_attributes, modResource.published, modResource.pub_date, modResource.unpub_date, modResource.parent, modResource.isfolder, modResource.introtext, modResource.richtext, modResource.template, modResource.menuindex, modResource.searchable, modResource.cacheable, modResource.createdby, modResource.createdon, modResource.editedby, modResource.editedon, modResource.deleted, modResource.deletedon, modResource.deletedby, modResource.publishedon, modResource.publishedby, modResource.menutitle, modResource.content_dispo, modResource.hidemenu, modResource.class_key, modResource.context_key, modResource.content_type, modResource.uri, modResource.uri_override, modResource.hide_children_in_tree, modResource.show_in_tree, modResource.properties, modResource.alias_visible FROM modx_site_content AS modResource WHERE ( modResource.parent IN (22,23,24,67,69,70,73,74,75,80,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99) AND modResource.deleted = 0 AND modResource.published = 1 ) ORDER BY publishedon ASC LIMIT 3
Observed behavior
My source code is working so far, but it returns me 3 items, which are always the latest based on the published-on timestamp. It does not show me the next 3 items from today’s date.
Expected behavior
I expect, that from today the next 3 items shall appear.
Environment
MODX version 3.1.0-pl