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

Print page created / last updated

Started by Susanne Broche 8 years ago · 0 replies · 615 views
8 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 Andy Miller, 2 days ago
0 69 2 days ago
General · by Veehem, 3 days ago
0 111 3 days ago
General · by milkboy, 4 days ago
0 113 4 days ago
General · by ian russell, 2 weeks ago
2 204 1 week ago
General · by pamtbaau, 1 month ago
2 462 2 weeks ago