Modified Date in Page Tables Layout

Hi,

I’m using the new tables layout for pages and am loving it. The only thing I can’t get to work is to show the modified date in a column.

Here is what I tried:

columns:
      modified:
        label: Date
        type: date
        display: DD.MM.YYYY

and

columns:
      date:
        label: Date
        value: "{{ page.modified.toDate('d.m.Y') }}"

Both didn’t work unfortunately… Can someone help? Thanks!!

The $page->modified() method already returns a formatted date string, so using toDate() should not be necessary. You should be able to do something like this:

columns:
  date:
    label: Date
    value: "{{ page.modified('d.m.Y') }}"
1 Like

Unfortunately, that doesn’t work for me.

When I use your suggestion this is what I get:

Bildschirmfoto 2022-10-10 um 11.06.19

When I only use

value: "{{ page.modified('d.m.Y') }}"

I can see the date string:
Bildschirmfoto 2022-10-10 um 11.07.30

Maybe this helps for putting it right?

Thanks a lot!

Still struggling with this. Any suggestions, @kirbyzone / @texnixe ?

Thanks!!

Depends on the handler, see $page->modified() | Kirby CMS