Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Show latest update and modified

theme

Started by Christophe 5 years ago · 2 replies · 748 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 Thomas, 1 week ago
2 64 17 hours ago
Support · by Anna, 3 days ago
2 68 20 hours ago
Support · by Justin Young, 21 hours ago
1 35 21 hours ago
Support · by Duc , 1 week ago
2 71 6 days ago
Support · by Colin Hume, 1 week ago
2 63 6 days ago