Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How to sort pictures by name

Started by Muut Archive 12 years ago · 22 replies · 2605 views
11 years ago

I just think the problem is that you are not explicitly setting the order. When you don't set an order, it's just going to use the order as defined in the filesystem. This is going to be different depending on the server and OS, and is very unreliable.

I would suggest setting the order with folder, ascending, something like this:

YAML
title: "PROGRAM"
body_class: posters
published: true
visible: false
template: sessions
content:
    items:
        '@taxonomy.category': session
        '@page': '/program/sessions'
    order:
        by: folder
        dir: asc

Full details on the ordering options are in the docs

NOTE: You will hae to set this order on every page that has a content collection defined in the page header.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Muut Archive, 10 years ago
1 676 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5337 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago