Access Page data with just the guid

Hi,
I am completely lost right now and I don’t find a way to make it work.

I have to pages (which are not related). The main pages needs to point on the siblings child.
I have the link already in the backend (via a query page in the blueprint.
If I access this field I get:

Kirby\Cms\Field Object
(
    [partner] => - page://rgGhBVnRje94h5mU
)

But if I try to access the url or the title of this page, I fail. usually I use the

page('name')

or

site->children()->template('TemplateName')->....

But neither seems to work.

So what I want is the url and the title of this: page://rgGhBVnRje94h5mU

Thanks in advance,
Simon

Use toPage() (or toPages() for multiple pages) method on the field, which will give a a page object.

1 Like

Thank you very much for your amazingly quick reply - as usual.