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 →

How to add a "last modified by <user>"?

theme

Started by Jean-Philippe Robichaud 8 years ago · 0 replies · 877 views
8 years ago

Hi, currently, we have multiple users defined for our system. I have added

Last Modified on <time datetime=" {{ page.date|date("M d Y") }}" class="entry-date entry-meta-element modified" title=" {{ page.date|date("M d Y") }}" itemprop="dateModified"> {{ page.date|date("M d Y") }} </time>

To our theme page.html.twig and it works well but I'd like to add also the name or email of the user who last modified that page. The page.header.author doesn't help much as it's not defined by default and I guess it wouldn't necessarily be updated when an different user comes in and edit a specific page.

Any tips?

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 1 day ago
2 42 19 hours ago
General · by Hanns Mattes, 1 week ago
0 123 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago