Change sorting in panel after the fact

I have a lot of posts sorted in the panel as oldest first. How can I change the sorting order for newest first in the panel?

I have a date field that I could use.

title: News Eintrag
icon: document
sortBy: date desc
num: '{{ page.created.toDate("DD.MM.YYYY") }}'

The num property doesn’t exist for sections, if the field name is created, you use that with the sortBy option, but you would do that in the pages section you want to sort.

Ok, I have a blog page (called “news”) and a blogpost page (called “news-article”). Both have sortBy: date desc because, you know, being on the safe side while confused.

title: News
preset: pages
templates: news-article
sortBy: date desc
title: News Eintrag
icon: document
sortBy: date desc

Which one of those sortBys is supposed to do the sorting? I would guess it is the one in the blog blueprint (‘news’). But in the docs it says it is the childrens blueprint.

Anyway, the blogposts (‘News Einträge’) stay sorted oldest first. I can’t re-sort them after the fact. Maybe this isn’t possible anyhow? Also I don’t want to change the order in the frontend, on the page.

Well, I only use sections, not presents, so I can tell you what it should look like with sections. So in your news blueprint:

title: News
sections:
  pages:
    type: pages
    sortBy: date desc # if your date field in the new-article pages have a different name for the date field, change it 
    template: news-article

Sections, yes. My old nemesis. In the mean time I figured out that it is preset vs. sections and threw on in. Sections won, everything is fine sorted. Gonna use them from now on and won’t ask questions.

towel.jpg