I want to run a piece of code only if there is more than one entry returned. What’s happening though is that the code is run multiple times because there is more than one entry returned. Is there a way to check the conditional and then jump out of the Weblog Entries loop? Or is there a way to set a dynamic variable based on the same Weblog Entries loop higher up on the page and then check that later in the page instead of re-running the loop? Any other ideas? It’s probably something simple, but I am over-thinking it!
{exp:weblog:entries weblog="scroller"}
{if total_results > 1}
<a href="#id=prev_scroller"><< Previous</a>
<a href="#id=next_scroller">Next >></a>
{/if}
{/exp:weblog:entries}