In a single entry page I have a section which consists of a header and a unordered list of related items.
<h2>Case studies</h2>
<p> <ul><br />
{exp:weblog:entries weblog="w_casestudies" custom_fields="on" related_categories_mode="on"}<br />
<li><a href="http://{title_permalink=">{title}</a></li><br />
{/exp:weblog:entries}<br />
</ul>This works fine.
However, when there are no results, I just get a header, and an empty <u></ul>. Clearly, I would like to suppress this if possible. any ideas?
I could use the {count} variable to do the header and opening <ul>, but can’t see how to determine the last result
{exp:weblog:entries weblog="w_casestudies" custom_fields="on" related_categories_mode="on"}
{if count==1}
<h2>Case studies</h2>
<p> <ul><br />
{/if}</p>
<p> <li><a href="http://{title_permalink=">{title}</a></li></p>
<p> {if ????? }<br />
</ul><br />
{/if}<br />
{/exp:weblog:entries}Have I missed a usefull variable?
thanks