$field->toPage()

Returns a page object from a uri in the field

  • return ($page)

Example

<?= $page->relatedpage()->toPage()->title(); ?>