dimaip
(Dmitri Pisarev)
October 20, 2016, 4:58pm
1
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
bwaidelich
(Bastian Waidelich)
October 23, 2016, 4:24pm
2
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?
dimaip
(Dmitri Pisarev)
October 23, 2016, 6:22pm
3
Sort has landed to core since Neos 2.3, should work…