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

Print page created / last updated

Started by Susanne Broche 9 years ago · 0 replies · 626 views
9 years ago

How do I print when a page was created and last changed, e.g. in the footer for a normal page (not for a blog)?

If I use:

{{ page.modified()|date("m/d/Y") }}
{{ page.created()|date("m/d/Y") }}
{{ page.published()|date("m/d/Y") }}

I get:

02/02/2018
02/02/2018
01/01/1970

The page.modified function seems to reflect the correct date (page was changed today), but page.created returns the same value and page.published something completely off (perhaps this related to testing this with php -S?)

Thanks for any help in advance!

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 days ago
2 80 2 days ago
General · by Andy Miller, 6 days ago
0 145 6 days ago
General · by Veehem, 1 week ago
0 144 1 week ago
General · by milkboy, 1 week ago
0 138 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago