This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi to all,
i have a little question for you: In Cms page i have a Folder "Report" Inside there are 16 pages that render a series of paragraph divided in folder in the content section.
Now in my layout i want to print the last update of these pages. How can i do? Is there a method to get teh date of the last save of the page? Or with the file:: method can i bring the date of the last save directly from the file in the filesystem?
Anyone have yet resolved this issue? I tried to dump this.page to print the date via twig but isn't a parameter last save.
isn't here a sort of twig like ({{ this.page.modyfied_at|date('d-m-Y') }})? Or how can i add it?
Any suggestions?
Thanks Bye Gabriele
Last updated
I know it is "a bit" too late, but still... I have been looking for the same solution for days...
Anyway, here's how I have solved it:
{{ this.page.lastModified | date('Y-m-d H:i', 'Europe/London') }}
More about date and time formatting can be found here: https://twig.symfony.com/doc/3.x/filters/date.html
Everyone reading this: .....
PHP developers: cries in laughter...
Last updated
1-2 of 2