title: Tournament

create:
  status: listed

sections:
  fields:
    type: fields
    fields:
      participants:
        width: 1/2
        label: Participants
        type: pages
        query: site.find('members')
        text: "{{ page.forename }} {{ page.surname }} <em>({{ page.nickname }})</em>"
      date:
        width: 1/2
        label: Date
        type: date
      # layout:
      #   type: layout
      #   layouts:
      #     - "1/6, 1/6, 1/6, 1/6, 1/6, 1/6"
      #   fieldsets:
      #     - heading
      #     - simple_game

  pages:
    type: pages
    label: Games
    template: xoi
    text: "[{{ page.startdate.toDate('d.m.') }}] {{ page.players.toPages.first.forename }} {{ page.players.toPages.first.surname }} vs. {{ page.players.toPages.nth(1).forename }} {{ page.players.toPages.nth(1).surname }}"
    sortBy: startdate desc
