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

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

theme

Started by Jean-Philippe Robichaud 7 years ago · 0 replies · 759 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 jeremycherfas, 1 week ago
5 199 9 hours ago
General · by lynbor, 6 days ago
2 131 3 days ago
General · by Old Man Umby, 1 week ago
1 106 1 week ago
General · by Sebastian, 2 weeks ago
1 131 2 weeks ago
General · by Andy Miller, 3 weeks ago
0 252 3 weeks ago