Fixed header.admin.children_display_order in Flex Pages to work just like with regular pages

This commit is contained in:
Matias Griese
2020-11-12 12:58:26 +02:00
parent c9a3f349ad
commit 94e6cb02f3
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,8 @@
* Fixed `print_r()` in twig
* Fixed sorting by groups in `Flex Users`
* Changing `Flex Page` template causes the other language versions of that page to lose their content [admin#1958](https://github.com/getgrav/grav-plugin-admin/issues/1958)
* Fixed plugins getting intialized multiple times (by CLI commands for example)
* Fixed plugins getting initialized multiple times (by CLI commands for example)
* Fixed `header.admin.children_display_order` in Flex Pages to work just like with regular pages
# v1.7.0-rc.17
## 10/07/2020

View File

@@ -414,7 +414,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
/** @var Header $header */
$header = $page->header();
if ($header->get('admin.children_display_order') === 'collection' && ($orderby = $header->get('content.order.by'))) {
if (!$field && $header->get('admin.children_display_order') === 'collection' && ($orderby = $header->get('content.order.by'))) {
// Use custom sorting by page header.
$sortby = $orderby;
$order = $header->get('content.order.dir', $order);