-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Unable to perform case-insensitive ordering of a collection when the order is based on a custom header field. #1169
Comments
…ring. If the `intl` PHP extension is loaded, only these flags are available: https://secure.php.net/manual/en/collator.asort.php. Otherwise, you can use the PHP standard sorting flags (https://secure.php.net/manual/en/array.constants.php) [#1169](#1169)
Ok I've done a bit of research into this, and came up with this PR #1173 The thing to note is this: If the Otherwise, if
to order case insensitive. |
Wow, that was fast, and your solution is great. Thanks a lot! |
…ring. (#1173) If the `intl` PHP extension is loaded, only these flags are available: https://secure.php.net/manual/en/collator.asort.php. Otherwise, you can use the PHP standard sorting flags (https://secure.php.net/manual/en/array.constants.php) [#1169](#1169)
Also we are going to improve collections in Grav 2.0 |
The
$sort_flags
parameter is always set toSORT_REGULAR
when ordering a collection based on a custom header field.This is quite problematic since there are many situations where data is expected to be sorted case-insensitively.
Adding an optional
sort_flags
parameter to theorder
method of theGrav\Common\Page\Collection
class could help solve that issue.The text was updated successfully, but these errors were encountered: