I'm working on a collection which is a list of theater-productions.

Every production can have multiple dates when its performed. This date is being used to sort all productions in their own list and in one combined list. This combined list gives me troubles; when it's rendered it shows the productions alphabetical first and within their instances descending in date. To clarify this is what it looks like now:

Dido Dido – 2018-02-20
Mask Off – 2018-01-10
Mask Off – 2017-10-10
True Colors – 2018-02-01
True Colors – 2018-01-01
True Colors – 2017-08-01

But the intention is that the list flows like this:

Dido Dido – 2018-02-20
True Colors – 2018-02-01
Mask Off – 2018-01-10
True Colors – 2018-01-01
Mask Off – 2017-10-10
True Colors – 2017-08-01

So the date has to be prevalent.

How can I sort the combined list based on date alone?

The fieldset productions.yaml looks like this:

title: Productions
hide: true
taxonomies: false
fields:
  title:
    type: title
  performances:
    type: replicator
    sets:
      performance:
        fields:
          playdate:
            type: date

The template productions.html looks like this:

<ul>
{{ collection:productions sort="playdate:desc" }}
  {{ performances sort="playdate:desc" }}
      <li>{{ title }} – {{ playdate }}</li>
  {{ /performances }}
{{ /collection:productions }}
</ul>
Answered by Jason Varga! Go to answer.