silverstripe-dms/docs/en/manage-page-relations.md

219 B

Manage page relations

To find documents by a Page:

$dms = DMS::getDMSInstance();
$page = SiteTree::get()->filter('URLSegment', 'home')->first();
/** @var DataList $docs */
$docs = $dms->getByPage($page);