Hi,
I have a list in sidemenu of categories and entries form these categories. Some of categories will just have 1 entry so then I dont want to display this entry as the name it will be like a category name. Can I use entries_number plugin to work that out?
What I have now is not working:
{exp:weblog:category_archive weblog="about-us" style="nested" sort="desc" orderby="date"}
{categories}
<span><a href="http://{path=about-us/index}">» {category_name}</a></span>
{/categories}
{exp:entries_number category="{category_id}" weblog="about-us" site="1"}
{entry_titles}
{if entries_number > 1}
<a href="http://{path=about-us/index}">» {title}</a>
{/if}
{/entry_titles}
{/exp:entries_number}
{/exp:weblog:category_archive}
Thank you, Agata
Hi Laisvunas,
Yes, I know it is not supported. I found another way:
{exp:weblog:categories weblog="about-us" style="linear" show_empty="no" disable="category_fields"}
<ul class="nav_cat_archive"><li><span class="{category_url_title}"><a href="http://{path=about-us/index}">{category_name}</a></span>
<ul>
{exp:weblog:entries weblog="about-us" category="{category_id}" disable="trackbacks|member_data|pagination|categories" url_title="not {category_url_title}" dynamic="off"}
<li><a href="http://{site_url}about-us/{url_title}">» {title}</a></li>
{/exp:weblog:entries}
</ul>
</li>
</ul>
{/exp:weblog:categories}
So all is working 😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.