Date not visible in summary of admin

I am trying to make an event calendar.
In the summary in the admin, the “hall” and “place” do show up, but the “date” doesn’t.
I have tried changing the formatting of the date with {{concert_date | date_to_long_string}}
but it doesn’t show up.


What am I doing wrong?
Any help is highly appreciated!

Here is the code:

collections:

  - name: "concerts"

    label: "Concerts"

    label_singular: "Concert"

    folder: "_concerts/"

    create: true

    summary: "{{hall}}, {{place}}, {{ concert_date }}"

    slug: "{{concert_date}}-{{hall}}"

    editor:

      preview: false

    fields:

      - {

          label: "Layout",

          name: "layout",

          widget: "hidden",

          default: "concert",

        }

      - { label: "Zaal", name: "hall", widget: "string" }

      - {

          label: "Datum",

          name: "concert_date",

          widget: "datetime",

        }



      - { label: "Plaats", name: "place", widget: "string" }

      - { label: "Repertoire", name: "repertoire", widget: "string" }

      - { label: "Musici", name: "musicians", widget: "text" }

      - {

          label: "Link naar organisator",

          name: "organizer_url",

          widget: "text",

          required: false,

        }

Edit: The datetime format that’s being saved in the slug is in this format: sat-oct-01-2022-12-50-00-gmt-0200-midden-europese-zomertijd

but the format that’s saved in concert_date is in this format: 2022-10-01T10:50:00.000Z

How can I convert the slug into the standard format?

I think you can apply filters like this: summary: "{{hall}}, {{place}}, {{concert_date | date('YYYY-MM-DD')}}". This feature is currently in beta: Beta Features! | Netlify CMS | Open-Source Content Management System.

You can track the progress for dynamic filters here: Support filters for template strings · Issue #3677 · netlify/netlify-cms · GitHub

1 Like

Thank you, this is exactly what I was looking for!