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 →

Show latest update and modified

theme

Started by Christophe 5 years ago · 2 replies · 1143 views
5 years ago

Hello everyone,

I want showing the latest date/modified date on the homepage's footer, when a specific collection of (child) pages is last updated and/or modified.
So i make a collection from specific pages:

TWIG
{% set alldogzones = page.collection({
    'items': '@root.descendants',
  }).ofType('dogzone') %}

Show total dogzones works perfect:
{{ alldogzones|length }}

But is there a specific twig-filter showing the last updated and/or last modified date from a collection?

last edited 12/07/21 by Christophe
5 years ago

@Karmalakas:
the docs for lastModified

Hi,
I will display, not only last modified date, but also the latest added dogzone date, similar like on this website https://dogvalley.be/ (see also footer).
Thanks for the link, i will try found out with this info.

Suggested topics

Topic Participants Replies Views Activity
Support · by themetman, 1 day ago
6 74 6 hours ago
Support · by TomW, 2 weeks ago
8 286 4 days ago
Support · by alex, 3 months ago
8 703 4 days ago
Support · by Supple, 1 week ago
1 133 5 days ago
Support · by TomW, 2 weeks ago
3 208 6 days ago