Hi,
I’m in the middle of updating Kirby from 3.2.4 to 3.3.2, and I noticed a change in behaviour in the $pages->sortBy()
function:
Consider following structure:
parent-page
|-- 1_child-page-e (⭐️)
|-- 2_child-page-d
|-- 3_child-page-c (⭐️)
|-- 4_child-page-b
|-- 5_child-page-a
Each child page has a boolean “status”-field. c & e have status true
(). In previous Kirby upon applying
page("parent-page")->children()->sortBy("statusfield", "asc")
this was the outcome:
- 1_child-page-e (
)
- 3_child-page-c (
)
- 2_child-page-d
- 4_child-page-b
- 5_child-page-a
but in 3.3.2 this seems to get reordered alphabetically first:
- 3_child-page-c (
)
- 1_child-page-e (
)
- 5_child-page-a
- 4_child-page-b
- 2_child-page-d
This is not what I want. I want the manually sorted order to persist when the sortby happens (status first). Any clues how?