Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 457 Bytes

find-latest-modified-child.md

File metadata and controls

31 lines (18 loc) · 457 Bytes

title: Find latest modified (sub)child of a page


version: 1.0.0


authors: isellsoap


tags: pages, modified, latest, children


problem: A page has got a possibly deeply nested children structure and you want to get the latest modified child of that page.


solution:

$lastModifiedChild = $page->find("id>0,sort=-modified")->first;

resources: