Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sortby order of ids defined in "resources" #192

Closed
pepebe opened this issue Mar 4, 2016 · 2 comments
Closed

sortby order of ids defined in "resources" #192

pepebe opened this issue Mar 4, 2016 · 2 comments
Labels

Comments

@pepebe
Copy link

pepebe commented Mar 4, 2016

How can I switch off default sortby/sortdir.

            [[!pdoResources?
                &parents=`20`
                &resources=`45,62,4`
                &tpl=`textbausteine_tpl`
                &tplWrapper=`textbausteine_tplWrapper`
                &showHidden=`1`
                &includeContent=`1`
            ]]

I want to list the resources in exactly the same order as stated in the resources parameter.

There is an old thread that describes that problem, but the solutions are all hacky...

http://forums.modx.com/index.php/topic,62808.msg356290.html

There is also a solution in RTFM for getResources:

&sortby=FIELD(modResource.id,[[*templateVariable]])&sortdir=ASC`

https://rtfm.modx.com/extras/revo/getresources

But pdoTools doesn't support this.

Finally there is a PR by oliver Haase Lobinger (not merged) for a solution in getResources:

opengeek/getResources#101

Is there any chance this can be solved in the near future?

Cheers,

Patrick

@bezumkin
Copy link
Collaborator

bezumkin commented Mar 4, 2016

You won`t believe!

&sortby=``

or

&sortby=`ids`

@pepebe
Copy link
Author

pepebe commented Mar 6, 2016

You won't belive, I've tried EVERYTHING except that.

Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants