You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
I have some pages that represent articles. Each article has a volume and a number. (For example: Volume 1, Number 10. Volume 12, Number 3.) I need to be able to sort (and hopefully search) by both the volume and number.
So far the best I could come up with was something like this:
I need to pad the volume/number with a zero so that they sort correctly. Otherwise it puts Volume 10 before Volume 2.
If I put the volume in one column and the number in the other I can sort correctly by volume but the number column is randomly sorted which kind of defeats the purpose.
Ideally I wouldn't need to pad the numbers to get them to sort correctly. Also, this makes it difficult to search by volume and number since you have to pad the digits in the search field too. Is there an easy way to solve this?
The text was updated successfully, but these errors were encountered:
Hello, I've came back a few times to this issue, every time trying to figure out how to do this in a simple way.
Combining multiple sortings would add a lot of complexity in the code (so a plugin harder to maintain), for a very specific use-case. I won't fix unless someone comes up with something dead simple.
In your situation, I would sort the whole section with the sort blueprint param:
mypagetables:
type: pagetablesortBy: volume asc number asc
I have some pages that represent articles. Each article has a volume and a number. (For example: Volume 1, Number 10. Volume 12, Number 3.) I need to be able to sort (and hopefully search) by both the volume and number.
So far the best I could come up with was something like this:
I need to pad the volume/number with a zero so that they sort correctly. Otherwise it puts Volume 10 before Volume 2.
If I put the volume in one column and the number in the other I can sort correctly by volume but the number column is randomly sorted which kind of defeats the purpose.
Ideally I wouldn't need to pad the numbers to get them to sort correctly. Also, this makes it difficult to search by volume and number since you have to pad the digits in the search field too. Is there an easy way to solve this?
The text was updated successfully, but these errors were encountered: