This should be simpler in my mind, I’m fried as usual.
Creating a list of images like this:
{% set imgList =[] %}
{% for image in page.media.images %}
{% set imgList = imgList|merge([image]) %}
{% endfor %}
Each image has an imagename.ext.meta.yaml
file present such as this:
title: Mardis Gras Invitation
media: digital
intent: print
portfolio: true
description: Design for a benefit Mardi Gras party sponsoring The Human Race Theatre Company
date: 12/01/2015
I’d like to sort the imgList
array by date, newest to oldest (descending?) when I’m outputting it like this:
<ul>
{% for img in imgList %}
<li>date: {{ img.meta.get('date') }} title: {{ img.meta.get('title') }}</li>
{% endfor %}
</ul>
Please advise.