I feel like I have seen a solution to my issue in the EE docs before, but now I can't find what I'm looking for. I would like to exclude some information from repeating inside of a channel entries loop, i.e. the header of the section. the reason for this is because i would like to display a different header-type depending on the amount of information that's returned (therefore, I can't just put the header outside of the loop).
In this example, I'd like Upcoming Events to appear only once, but i'd like the ul div to repeat:
{exp:channel:entries site="default_site" channel="events" sort="asc" limit="8"}
{if total_results == "7"}
<h2>UPCOMING EVENTS</h2>
{if:else}
<h4>UPCOMING EVENTS</h4>
{/if}
<ul class="list">
<li>{event_short_name}</li>
</ul>
{/exp:channel:entries}