I'm working on a new website for my student radio station but I've stumbled into a few key bugs which are stopping us from advertising the new site.
It's live right now over on Stormfm.com, you'll be able to see the problems for yourselves there.
The up coming shows section is supposed to display the next 3 shows, however there's a bug with it's limit, to get the section to display at least 3 shows I had to raise the limit to 30, this then means up to 30 shows display. I've copied the code below.
{% for entry in craft.entries.section('shows').order('showTime').limit(30)
if entry.showDay.contains('now'|date('N')) and entry.showTime > 'now'|date('H:i') %}
<div class="flex-box mobile">
<a class="link-block w-inline-block" href="{{ entry.url }}">
<div class="up-coming-image" style="background-image:url({{ entry.showImage[0].url }}); background-size:cover;" >
<div class="up-coming-fade" data-ix="fademouse">
<div>{{ entry.showTime }} - {{ entry.showLength }}</div>
<h4 class="up-coming-heading">{{ entry.Title }}</h4>
<div>With {{ entry.hostname.first().title }} </div>
</div>
<div class="image-btn">></div>
</div>
</a>
</div>
{% endfor %}
Also I want to display what the current show on air is, originally I was going to use a similar code to the above, limit it to 1 and have it minus an hour but I can't seem to work out how to do that. For the short term I can flip the greater than to less than, however this then displays only the closest show and I can't else out into a default display if nothing is currently timetabled as on air.
I hope this all makes sense and would appreciate any help you might be able to provide!
Tom