# Each page blueprint must have a title, the title may be different from the file name
title: Liste des compositions

# Each page can have an icon that is shown in page listings when no preview image is available.
icon: 📖

# Limit the possible page statuses to `draft` and `listed`.
# More about page statuses: https://getkirby.com/docs/reference/panel/blueprints/page#statuses
status:
  draft: true
  unlisted: true
  listed:
    label: Page visible dans le menu
    text: Cette page est listée dans le menu principal

# Page options allow you to control how users can interact with the page.
# Here we prevent changing the page slug and page deletion
# More about page options: https://getkirby.com/docs/reference/panel/blueprints/page#options
options:
  changeSlug: false
  delete: false

tabs:
  # content tab
  contenu:

    # Define the form layout with two columns, each column has a set of fields
    # Columns are optional but help structure the form layout
    # More about columns: https://getkirby.com/docs/guide/blueprints/layout#defining-columns
    columns:
      - width: 1/1
        # Kirby has many different field types, from simple text fields to the more complex structure field that contains subfields
        # All available field types: https://getkirby.com/docs/reference/panel/fields
        fields:
          headline:
            label: Titre
            type: text
          text:
            label: Texte
            type: textarea
          titletable:
            label: Titre du tableau
            type: text
          listing:
            label: Liste des compositions
            type: structure
            fields:
              name:
                label: Titre
                type: text
                width: 1/2
              category:
                label: Catégorie
                type: tags
                width: 1/2
                options: query
                #query: page.siblings.pluck("category", ",", true)
                query: page.listing.distinct.toStructure.pluck("category", ",", true)
                max: 1
                
              description:
                label: Description
                type: textarea
                width: 1/2
              related:
                label: Lien vers une page (facultatif)
                type: pages
                query: site.index
                multiple: false
                #info: "{{ page.images.count }} image(s)"
                #empty: "No gallery selected"
                width: 1/2
                
              player:
                label: Écoute (code d'intégration soundcloud.com)
                type: textarea
                width: 1/1

  # seo tab
  seo: tabs/seo