Fix: Sort children pages with Position field
This commit is contained in:
parent
a36f2534a0
commit
45185fb064
1 changed files with 3 additions and 2 deletions
|
@ -657,10 +657,11 @@ class Pages extends dbJSON {
|
||||||
$list = array();
|
$list = array();
|
||||||
foreach ($tmp as $key=>$fields) {
|
foreach ($tmp as $key=>$fields) {
|
||||||
if (Text::startsWith($key, $parentKey.'/')) {
|
if (Text::startsWith($key, $parentKey.'/')) {
|
||||||
array_push($list, $key);
|
$list[$key]=$fields['position'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $list;
|
natcasesort($list);
|
||||||
|
return array_keys($list);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sortBy()
|
public function sortBy()
|
||||||
|
|
Loading…
Reference in a new issue