blinks4451850
blinks4451850

Greetings! I want to add last-modified header for CMS pages, in twig we have this variable {{ this.page.lastModified }}, but how to get access to it in PHP code block? $this->page->lastModified of course doesn't work :(

Thank you!

Last updated

mjauvin
mjauvin

look at using:

$this->template->lastModified

Last updated

blinks4451850
blinks4451850

mjauvin said:

look at using:

$this->template->lastModified

Trying to get property 'lastModified' of non-object :(

mjauvin
mjauvin

What about

$this->page->mtime
blinks4451850
blinks4451850

mjauvin said:

What about

$this->page->mtime

Ou, this is working! Thank you!

1-5 of 5