Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

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

first-time

Solved by pamtbaau View solution

Started by eduardeisman 6 years ago · 2 replies · 506 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 Thomas, 1 week ago
2 57 14 hours ago
Support · by Anna, 3 days ago
2 65 17 hours ago
Support · by Justin Young, 18 hours ago
1 33 18 hours ago
Support · by Duc , 1 week ago
2 68 5 days ago
Support · by Colin Hume, 1 week ago
2 60 6 days ago