List unlisted pages before listed ones in pages section

Heyhey,
Is there a possibility to sort the ‘home’-Page or unlisted pages in general before listed pages within a pages section without breaking the manual sorting? If I define sortBy: status desc the draggable sorting is lost, which makes it not so intuitive for some users.

I think can’t be easy with just using sortBy in blueprint. You can try to use query prop something like that:

query: site.childrenAndDrafts.sortBy('template', 'home').sortBy('num', 'asc')
1 Like

query also prevents sorting.

I had the same problem and I solved this particular use case by making the home page listed and excluding it from menus. Conceptionally that makes sense in my head because home is also “listed” by being the logo link :slight_smile:

<?php
foreach($pages->listed()->not($site->homePage()) as $menuItem {
  // your code
}
?>

thank you for your replies!
I also solved it now by setting home as listed.