This is super weird. I have this channel entries loop:
{exp:channel:entries
channel='resources_webinars'
dynamic='no'
limit='5'
disable='categores|member_data|pagination'
orderby='webinars_date'
sort='asc'
search:webinars_featured='=not_featured'
}
{if webinars_date > current_time}
{if count == 1}
<div class="heading clearfix">
<h3>Upcoming Webinars</h3>
</div><!--/.heading-->
<ul class="items webinars resetlist">
{/if}
<li class="clearfix">
<article>
<a href="{webinars_registration}" class="preview">
<figure>
{exp:ce_img:single
src='{webinars_thumb}'
width='210'
height='100'
crop='yes'
allow_scale_larger='yes'
alt='{title} preview'
}
</figure>
</a>
<div class="text clearfix">
<header>
<h4><a href="{webinars_registration}">{title}</a></h4>
<p class="sml"><strong>{webinars_date format='%F %j, %Y'}</strong> / {webinars_date format='%g:%i%A'}</p>
</header>
<p>{webinars_summary}</p>
<footer>
<a href="{webinars_registration}" class="btn-ui action">Register</a>
</footer>
</div><!--/.text-->
</article>
</li>
{if count == total_results}
</ul>
{if count == 5}
<p class="learn-more clearfix"><a href="{path='resources/webinars/upcoming'}">View All Upcoming Webinars »</a></p>
{/if}
{/if}
{/if}
{/exp:channel:entries}
It basically shows all non-featured upcoming webinars, sorted by a custom date field. What's weird is that adding sort="asc"
causes the {if count}
conditionals at the top and bottom not to work, so the opening and closing <ul>
tags aren't output.
What's even weirder is that if I put sort="desc"
, everything works fine.
Anybody ever seen anything like this before?
EE 2.5.5