$field->toPage()

Returns a page object from a uri in the field

  • return ($page)

Example

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