Skip to content

Accepted parameters for function not documented #2413

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

Open
stairjoke opened this issue Feb 24, 2025 · 2 comments
Open

Accepted parameters for function not documented #2413

stairjoke opened this issue Feb 24, 2025 · 2 comments

Comments

@stairjoke
Copy link

stairjoke commented Feb 24, 2025

Issue with Reference
The page https://getkirby.com/docs/reference/objects/toolkit/collection/sort states:

Sorts the elements by any number of fields

But there is no information on usable parameters. When digging deeper, it becomes clear the function sortBy()-is an alias, and its page contains that the function takes "mixed" arguments.

Based on this documentation, usage of this function is unclear. Should I pass a string, similar to the sorting options in blueprints? Should I pass an array of options—but what options?

Expected
A table giving information about the arguments the function expects, what they mean, and an example of its use.

Screenshots
Table of Parameters on alias function:
Image
This table, unfortunately, is also useless.

@stairjoke stairjoke changed the title Usage unclear Accepted parameters for function not documented Feb 24, 2025
@stairjoke
Copy link
Author

stairjoke commented Feb 24, 2025

I asked GPT, I think it got it right? Well its working, we’ll see what happens: https://chatgpt.com/share/67bc5836-9d1c-8002-870c-f20d19f651cc

@lukasbestle
Copy link
Member

lukasbestle commented Mar 17, 2025

Hi Wenzel,

Sorry for the late response and thanks for bringing this up. I've already created two issues for our reference:

We have already documented the sorting methods here and will probably also add a link to this recipe to the relevant reference pages: https://getkirby.com/docs/cookbook/collections/sorting

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

No branches or pull requests

2 participants