Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Creating a: "This Page was last edited on..." statement

first-time

Solved by pamtbaau View solution

Started by eduardeisman 6 years ago · 2 replies · 1022 views
6 years ago

Hello everyone,

I am assuming grav has the functionality to create a page or subpage wide "last edited" statement?

Like this: "This page was last edited on 30 June 2020, at 19:42 (UTC)."

Could someone point me to a section in the Docs where I would find information about this?
I tried looking through them but I couldnt find anything. Maybe I am wording it wrong as well.

I have to say generally I have quite some troubles finding anything by search in the docs, anybody has a similar experience? I usually just find things by guessing in which chapter it could be. Am I doing something wrong?

I hope this topic doesnt violates any rules, sorry if it did.

Thanks

EE

6 years ago Solution

@eduardeisman, have you tried adding something like the following to one of the templates:

TWIG
<p>This page was last edited on {{ page.date | date('F jS \\a\\t g:ia e') }}</p>

I think I can agree with you about the docs. Search isn't that strong...

And above snippet requires the combination of info from several sources, which makes it a tad more difficult.

See:

👍 1
last edited 07/24/20 by pamtbaau
6 years ago

No I didnt. But your suggestion works for me!
As usual I was thinking to complicated to even consider "date".

Thank You 🙂

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 227 9 hours ago
Support · by alex, 2 months ago
8 667 23 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 159 3 days ago
Support · by TomW, 6 days ago
2 106 5 days ago