This is more a question of aesthetics
I’m trying to display a list (UL) of entries while on a category home page, but only if there are entries.
Is there a way with less conditionals?
See the “working but ugly” code:
<div id="SecondaryContent">
{exp:weblog:entries weblog="{embed:channel}" status="not home|Cat_Description" sort="asc"}
{if count<2}
<div class="widget">
<h3>Also in this category</h3>
<p> <div class="borders"><br />
<ul><br />
{/if}<br />
<li><a href="http://{title_permalink=">{title}</a></li><br />
{if count=={total_results}}<br />
</ul><br />
</div><br />
</div><br />
{/if}<br />
{/exp:weblog:entries} <br />
</div><!-- End SecondaryContent -->Where the conditionals are all there so the DIV’s don’t get repeated for each entry.