Hi -
I’m using the filter method to show only images that include ‘slide’ in the filename in a slider.
foreach($page->images()->filterBy('filename', '*=', 'slide')->sortBy('sort', 'asc') as $image): ?>
<li><img src="<?= $image->url() ?>" alt="<?= $page->title()->html() ?>" /></li>
Its working fine but I’m hoping someone out there can help me with an opening if statement to show the slider at all only if there are images present with the slide term in the filename.
As you can see I’m still learning the php side of things, but I’m trying! Thanks