I want to get the image from the banner of a child page as a listing image on the parent page. Wht code would I need on the parent page?
Child page banner:
<?php
$bannerimages = $page->cover()->toFiles();
$firstslide = $bannerimages->first();
$noOfSlides = $bannerimages->count();
?>
<!-- HERO CAROUSEL -->
<div id="hero" class="banner bg-dark carousel slide carousel-fade" data-bs-ride="carousel" data-sal="fade">
<?php if($noOfSlides > 1): ?>
<div class="carousel-indicators">
<?php foreach($bannerimages as $bannerimage): ?>
<button type="button" data-bs-target="#hero" data-bs-slide-to="<?= $bannerimages->indexOf($bannerimage); ?>" class="<?php if($bannerimage == $firstslide) echo 'active' ?>" aria-current="true" aria-label="Slide"></button>
<?php endforeach ?>
</div>
<?php endif; ?>
<div class="carousel-inner">
<?php foreach($bannerimages as $bannerimage): ?>
<div class="carousel-item<?php if($bannerimage == $firstslide) echo ' active' ?>">
<img src="<?= $bannerimage->crop(1600, 900, 90)->url() ?>" class="d-block w-100" alt="ALT TAG">
<div class="curve"></div>
<div class="carousel-caption d-none d-md-block">
<h1><?= $bannerimage->caption()->kt() ?></h1>
</div>
</div>
<?php endforeach ?>
</div>
<?php if($noOfSlides > 1): ?>
<button class="carousel-control-prev" type="button" data-bs-target="#hero" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#hero" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
<?php endif; ?>
</div>
Parent Page Code (so far):
<?php $housetypes = $page->children()->listed(); ?>
<?php foreach($housetypes as $house): ?>
<a href="<?= $house->url() ?>" class="slide text-center">
<div class="hover-frame relative">
<img class="img-fluid" src="CODE NEEDED HERE" alt="Alt Tag">
<div class="overlay">
<div class="text">
<p class="pre-header"><?= $house->title(); ?></p>
<p class="blurb">The House Type A is a delightful home featuring an open-plan kitchen/dining area and a separate living room, together with an en-suite main bedroom, two further bedrooms and a family bathroom.</p>
</div>
</div>
</div>
<p class="pre-header">4 Bedroom Home</p>
<h4>House Type A</h4>
</a>
<?php endforeach ?>