A found a few questions related to this one. However, the solution they provide is not compatible with my situation.
- How do I hide a div when the channel entries tag it contains has no results?
- Render HTML only if channel has entries
I have a set of tabs which act as filters for displaying content.
<ul id="tabs">
<li><a href="#tab-approved">Approved</a></li><!-- only display if channel has entries -->
<li><a href="#tab-pending">Pending</a></li>
</ul>
<div id="tab-approved">
{exp:channel:entries channel="thing" search:thing_status="approved"}
...
{/exp:channel:entries}
</div>
...
How can I only display the tab if there are entries which match the search filter?
ul#tabs
on a layout template?