Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

first-time

Solved by pamtbaau View solution

Started by eduardeisman 6 years ago · 2 replies · 708 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 complanar, 6 days ago
6 139 14 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 50 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago