Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

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

theme

Started by Jean-Philippe Robichaud 7 years ago · 0 replies · 794 views
7 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 Andy Miller, 7 days ago
0 112 7 days ago
General · by lynbor, 1 month ago
3 439 2 weeks ago
General · by lynbor, 3 weeks ago
7 562 2 weeks ago
General · by Harry, 2 weeks ago
0 161 2 weeks ago
General · by Old Man Umby, 1 month ago
2 309 3 weeks ago