I want to output this:
<ul>
<li>Silica Fume</li>
<li>Fly Ash</li>
<li>Sodium Gluconate</li>
</ul>But, where there are no entries, I dont want to end up with and empty
<ul></ul>and if I do this:
<ul>
{exp:channel:entries related_categories_mode="yes" custom_fields="yes" member_data="yes"}
<li>{title}</li>
{/exp:channel:entries}
</ul>This is exactly what will happen.
Some CMS have a ‘wrap’ parameter but I cant seem to find one for EE2 so at this stage I’m using
{exp:channel:entries related_categories_mode="yes" limit="1"}
{if total_entries !=""}
<ul>
{/if}
{/exp:channel:entries}
{exp:channel:entries related_categories_mode="yes" custom_fields="yes" member_data="yes"}
<li>{title}</li>
{/exp:channel:entries}
{exp:channel:entries related_categories_mode="yes" limit="1"}
{if total_entries !=""}
</ul>
{/if}
{/exp:channel:entries}Surely there’s a better way of doing this? Hopefully I’m missing something.