Closed dijkr closed 1 year ago
Solutions, using an if-statement within the collection:
{{ collection:home }}
{{ if published }}
<div class="aanbiedingsactie">
{{# <div class="aanbiedingsactie-item"> #}}
{{ glide }}
<img src="{{ banner_pm }}"/>
{{ /glide }}
<div class="text-overlay-actie">
<h2> {{ title }}</h2>
<h3> {{ subtitle }}</h3>
<a href="/aanbiedingen">Aanbiedingen</a>
{{# </div> #}}
</div>
</div>
{{ else }}
<p><h3>Binnenkort volgen er weer nieuwe acties!</h3></p>
{{ /if }}
{{ /collection:home }}
The view tries to display results, when nothing is published. It would be nice it display nothing or display something to mitigate the issue.