Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

How to sort pictures by name

Started by Muut Archive 12 years ago · 22 replies · 2057 views
10 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 Deleted User, 9 years ago
0 1366 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago