Closed mindeffects closed 9 years ago
We are going to start with this:)
Fixed and PR Jason's repository https://github.com/opengeek/getResources/pull/97;)
Now you can use it like this:
[[!getResources? &resources=
4,3,2,5&sortby=
resources&tpl=
tpl.item]]
OR
[[!getResources? &resources=
4,3,2,5&sortby=
{"resources":"DESC"}&tpl=
tpl.item]]
@mindeffects will be happy :) Thanks, guys! :+1:
Merged ;)
Yes, very happy! THANKS A LOT! Now only @drumshaman (Jason) has to approve it, right?
@mindeffects Nope, it has been already merged, thanks to @TheBoxer :smile:
Sweat mother of pie! Great! Thanks you, @TheBoxer!
Problem Once in a while I use getResources with a specific order of IDs, like for "show me related items which are stored in a TV as a comma separated list". The input order
&resources=
34,22,108``represents the importants of the resources, so the output should have this order to. But getResources is a little bitchy on that.Fix In getResources this is possible to do with a trick:
&sortby=
FIELD(modResource.id, 34,22,108 )`` But this means that you have to double the ID list for "&resources" and "&sortby". Not that hard but also not really elegant.Enhancement Creating a sort option like
&sortby=
resources`` which uses the "&resources"-IDs for the sorting.