How to get the date when the page and its content had been last modified?

Smth. like this does the trick:

${q(documentNode).children('main').find('[instanceof TYPO3.Neos:Content]').add(q(documentNode).children('otherCC').find('[instanceof TYPO3.Neos:Content]')).add(documentNode).sort('_lastPublicationDateTime').get(0).lastPublicationDateTime}
1 Like

Thanks, quite helpful!
“otherCC” stands for “other content collection” I assume, so for documents with a single (“main”) content collection it would just be:

${q(documentNode).children('main').sort('[instanceof TYPO3.Neos:Content]').sort('_lastPublicationDateTime').add(documentNode).get(0).lastPublicationDateTime}

With this I just get an error

Method "sort" is not callable in untrusted context

Because the SortOperation is probably a custom one, right?

Sort has landed to core since Neos 2.3, should work…