Fetch blueprint field selected pages and display image and name cards

I have a webpage where my publication is shown and then underneath i would like to show the people featured in this publication who worked on it. the people themselves have their own page in the kirby panel with image and name. their pages are selected via a blueprint field called ‘featured’ which appears on a given publication page. what i mean is, when the user enters the kirby panel and creates a publication page, they have a dropdown selector of pages with people to select who is featured in that publication. and those selected people should then be shown as cards with images and names. how do i fetch that data in my php template of a publication page? so far i have

<?php $field = $page->blueprint()->field('featured');
                        $featured = $page->featured();
                        echo $field['featured'][$featured] ?? $featured; ?>
            

but that just dumps this in the frontend

Featured

  • page://IuGKQAzRTBxCfCNj - page://xaFdDjO07UVfpgOB - page://u7YRVnhYahwsCBWc - page://FWAExb6Lq7cXBb3f - page://CV2Ih4eQJluEs3re

thank you!

Have a look at Pages | Kirby CMS

1 Like