I think this should be a really simple one, I am displaying a list of categories in a sidebar of a news page using the categories tag. I have set the show_empty=“no” so that any empty categories do not display, but i want to set a conditional to not display the static heading above if there are no categories displaying in the navigation, ideally I would like to hide the section tags as well, this is the code I have at the moment:
<section>
<h2>News Categories</h2>
<p> {exp:channel:categories channel="news_articles" show_empty="no"}<br />
<a href="http://{path=news}">{category_name}</a><br />
{/exp:channel:categories}<br />
</section>I am thinking I will need to wrap the section tags and heading in either a channel entries tag or categories tag to then set the conditional but this seems quite over the top to do such a simple thing.
Any other ideas would be great.
Gareth