Hello everyone,
I’ve got following problem, I have a foreach loop that is working perfectly fine. But I’d like to display “No items available” if foreach finds nothing. How to achieve this with kirby?
currently I’ve got following code
<?php foreach($page->site()->index()->filterBy('documentindex', '*=', $code) as $item): ?>
<ul class="card-information">
<li><h3><?= $item->title()->html() ?></h3></li>
<li class="action"><?= $item->documentProtocollInformation()->kt()?></li>
</ul>
<?php endforeach ?>
???? <p>No items avaiable</p> ?????