File order in panel has no effect on front-end

I am working on a site with mulit-language setup. When I manually order files in my panel via drag’n’drop and call them at front-end in a php-foreach-loop, they will still be ordered by filename. “sortBy()” has the same behaviour. I don’t know how to fix this.

I guess you have manual sorting enabled? Does the sorting number get saved to the file meta data file?

Do you use sortBy('sort', 'asc')?

Manual sorting was enabled. Sorting number was not saved as property in any of the corresponding meta data files. Anyway pointing to value sort in sortBy() solved the issue. Did not try it out before, because sort has no representation in the meta data files, although it should (this is the bug in my point of view). Especially, because sort is not even documented in the Kirby Docs - it definitely should be! Thank you for your suggestions, Sonja :slight_smile: Liebe Grüße nach Mainz

1 Like

What version of Kirby are you using? I can’t reproduce the issue in Kirby 2.2.3 and the sorting number is added to the meta data file as it should. Maybe I should test with a multi-language site as well.

I am on Kirby 2.3.2 - started with langkit.

Hm, I just tested this with a fresh langkit, and the sort field and a number are added to both language meta files.

Have you set

  sortable: true

in your blueprint?

Doch. Shit. I looked into the meta files of a project I did not resort. Resorted projects got sort values in their meta data files … My bad.

So the meta data files ( etc.) were created correctly for each language but even after sorting and resorting the files no sort field was created?