Check if item contains 'more then'

Is there a simple way to check if a banner has multiple slides?

ie: If ‘greater than’ 1 slide, show navigation arrows.

I have a foreach loop for the slides working fine.


<?php 
  $bannerimages = $page->cover()->toFiles();
  $firstslide = $bannerimages->first();
?>  


  <?php foreach($bannerimages as $bannerimage): ?>
slide code here
 <?php endforeach ?> 

With

$bannerimages = $page->cover()->toFiles();
$noOfSlides = $bannerimages->count();

You get the number of files. So you can then check if the number is greater than 1.

Legend! Thank you :slight_smile: