Hello,
I have a category based navigation on a product page that has the following code to it:
{exp:channel:categories channel="Categories" parent_only="yes"}
<div class="link_list">
<a href="{path='categories'}">{category_name}</a>
</div>
{/exp:channel:categories}
I wanted to make this so that it only showed the categories that actually have visible items in it, so I found the show_empty= parameter. I tried this and when I added it to the code and set it to no, it hid everything.
Unfortunately all but two of seven categories have entries in them.
I then tried adding other tags like show_future_entries=“yes” and that made everything show up, even if there were no entries in them.
The problem I think I have is that all of the categories have entries, but depending on the status of the member, some of them don’t show any.
So even when I try and do a conditional statement, it doesn’t seem to work. Below is what I have:
{if logged_in AND (member_group == "1" OR member_group == "6")}
{exp:channel:categories channel="Categories" parent_only="yes"}
<div class="link_list">
<a href="{path='categories'}">{category_name}</a>
</div>
{/exp:channel:categories}
{if:else}
{exp:channel:categories channel="Categories" parent_only="yes" show_empty="no"}
<div class="link_list">
<a href="{path='categories'}">{category_name}</a>
</div>
{/exp:channel:categories}
{/if}
Thanks for any help you can provide!
