Sort structure field in blueprint and template

I just want to reverse the order.
Because I want the latest post to appear at the top.

But now, when I add a post to the structure field, it is added to the bottom.
Is there an easy way to fix it?

Oh I found a solution in the last post.
$page->videoarchive()->toStructure()->flip()

But I’m still curious how to filp the order of the blueprints in the structure field.

No, adding to the top is not possible yet. But there is a PR for this feature: Add to top feature for structure field by afbora · Pull Request #2523 · getkirby/kirby · GitHub

It is a shame that this is not possible, because I also need it.

It’s in 3.4, you can already test the pre-release.

In addition:
To reverse the display I used:
sortBy: date desc (“date” is a field in my blueprints)

Just an info on what my page is for: “For each message received by the forms or even the search engine, I store the data in an individual list in the panel of Getkirby”.

Exemple:

  messageriecontact:
    label: Messagerie page Contact
    type: structure
    limit: 20 #active paginate
    #prepend: true # ???
    sortBy: date desc #reverse list
    max: 1 #desactive bouton add
    fields:
      sender:
        label: Nom
        type: text
        width: 1/2
        disabled: true
      ...

Interest:
For contact forms: In the event of a messaging problem, everything is stored in the panel.
For research: It allows my client (online store) to know what customers are looking for and to add the products they are looking for (to be at the forefront of trends).

To come back to the panel side if necessary:

  1. I don’t need the “add button”, I put: max: 1 (to deactivate the button, but there is a red style all around the structure).
  2. I would like to delete the delete button to avoid the client deleting a list (it would have been nice in the role of the client that he could not delete, but that an administrator could delete spam).

Can these be future improvements?