mirror of
https://github.com/getgrav/grav.git
synced 2026-07-06 15:09:13 +02:00
Fixed default Flex Pages collection ordering to order by filesystem path
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
* Fixed missing method `translated()` in `Flex Pages`
|
||||
* Fixed missing `Flex Pages` in site if multi-language support has been enabled
|
||||
* Fixed Grav using blueprints and form fields from disabled plugins
|
||||
* Fixed default Flex Pages collection ordering to order by filesystem path
|
||||
|
||||
# v1.7.7
|
||||
## 02/23/2021
|
||||
|
||||
@@ -176,7 +176,7 @@ config:
|
||||
indexed: true
|
||||
# Set default ordering of the pages
|
||||
ordering:
|
||||
key: ASC
|
||||
storage_key: ASC
|
||||
search:
|
||||
# Search options
|
||||
options:
|
||||
|
||||
@@ -380,7 +380,7 @@ class FlexIndex extends ObjectIndex implements FlexCollectionInterface, FlexInde
|
||||
|
||||
// Handle primary key alias.
|
||||
$keyField = $this->getFlexDirectory()->getStorage()->getKeyField();
|
||||
if (isset($orderings[$keyField])) {
|
||||
if ($keyField !== 'storage_key' && isset($orderings[$keyField])) {
|
||||
$orderings['key'] = $orderings[$keyField];
|
||||
unset($orderings[$keyField]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user