In the panel: on the home page, I have a pages field on which a panel user can select subpages from another page (a project from a projects page). I’d like to access the fields of the selected subpage (title, image urls etc.)
Unfortunately, it tells me that the output of the pages field is a string, so I can’t really access the fields of the subpages. I searched the reference and tried toPage() to no avail. Is there another function similar to toPage()?
It kind of works if I change the top to toPages(). But only the title() works, but not if I want to access the images of the project subpages. Like <?=$project->thumbnail()->url(); ?>. The url output is (unknown).
<?php
$slideshowitems = $page->slideshowprojekte()->toPages();
foreach($slideshowitems as $slideshowitem):
?>