https://rtfm.modx.com/extras/revo/getresources - 在提问之前阅读文档。
&sortby=`FIELD(modResource.id, 4,7,2,5,1 )`
在你的情况下,这将是
&sortby=`FIELD(modResource.id, [[*HomePageUpcomingEvents]] )`
UPD
三个例子:
[[!getResources?
&parents=`-1`
&resources=`1,2,3`
&sortby=`FIELD(modResource.id, 3,2,1 )`
&tpl=`@INLINE [[+id]]`
&showUnpublished=`1`
&showHidden=`1`
&showDeleted=`1`
]]
<hr>
[[!getResources?
&parents=`0`
&resources=`1,2,3`
&sortby=`FIELD(modResource.id, 3,2,1 )`
&tpl=`@INLINE [[+id]]`
&showUnpublished=`1`
&showHidden=`1`
&showDeleted=`1`
&sortdir=`ASC`
]]
<hr>
[[!getResources?
&parents=`0`
&resources=`1,2,3`
&sortby=`FIELD(`modResource`.`id`, 3,2,1 )`
&tpl=`@INLINE [[+id]]`
&showUnpublished=`1`
&showHidden=`1`
&showDeleted=`1`
&sortdir=`DESC`
]]
三个输出:
1
2
3
<hr>
3
2
1
<hr>
1
2
3