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

Ordering variables with NULL value #3790

Open
petira opened this issue Jan 18, 2024 · 0 comments
Open

Ordering variables with NULL value #3790

petira opened this issue Jan 18, 2024 · 0 comments

Comments

@petira
Copy link

petira commented Jan 18, 2024

If I order the list of pages according to the (custom) page variable, which is optional, if this does not exist (it has a value of NULL), in the case of ascending ordering, the pages with NULL are at the end, in the case of descending ordering, the pages with NULL are at the beginning. But I would need the NULL values to be ordered before 0, or vice versa after 0.

Specifically in the case of {% set options = { items: {'@page.children': '/my-page'}, 'limit': 10, 'order': {'by': 'header.progress', 'dir': 'desc'}, 'pagination': false } %}, instead of the following output:

NULL
5
4
3
2
1
0

I want this output:

5
4
3
2
1
0
NULL

Now I solve it by double browsing, but it is not very comfortable, and mainly it takes twice as much time.

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

No branches or pull requests

1 participant