Closed jaro-io closed 1 year ago
Hello 👋
both methods should work and were definitely functioning in the past. Will have a look at this tomorrow. What Kirby version are you using?
kirby 3.9
, pagesdisplay 0.2.4
but i am pretty sure i also had that problem before upgrading to 3.9
..
thank you so much 🙏🏻✨🐋
I'm unable to reproduce the problem with those versions 🤷 and both options correctly work here. Just for testing, does putting this into a template produce the expected output for you?
<?php foreach($page->children()->sortBy('date', 'desc'): ?>
<?= $page->title() ?>: <?= $page->date() ?>
<?php endforeach ?>
What is stored in the date
field?
@rasteiner i am so sorry, haha. i have wasted your time. i was extending a pages
section blueprint. and just overrode the type to pagesdisplay
. but i didn’t see that in the base version i already had some sorting options set. if i remove those it of course works all fine again. sorryyy, maybe it was just too late yesterday. anyway, thank you for your time and looking into this so quickly! i really appreciate that.
🍁 🍂
hey @rasteiner ✨ i would love to be able to sort the pages in my
pagesdisplay
sections. and pls don’t get me wrong. i don’t mean manual sorting in the panel, like you can do with the regularpages
section andlisted
pages. i just mean usingsortBy()
inside the query. like you can usefilterBy()
.i tried both of these options but none seemed to work:
would be loooovely if you could add this! thank you so much. 😍