BoldMinded acquires Ansel, support ending for all add-ons. BoldMinded acquires Ansel, support ending for all add-ons. Read More →
Support has been discontinued. Issues remain available as an archive. Support has been discontinued. Issues remain available as an archive.
Count Engtries in each category
#168 opened by Octave 2 Media
Description
Solution:
{exp:category_construct:categories
group_id="7"
entry_count="true"
}
{construct:cat_name} ({construct:entry_count})
{/exp:category_construct:categories}
I thought I could output the number of entries in each category like this.
{exp:category_construct:categories group_id="7"} {construct:cat_name}({construct:entry_count})<br> {/exp:category_construct:categories}
But the entry_count tag does nothing, it shows itself on the site. Did I misunderstood something?
Werner
Replies
- TJ Draper
Replied 1/22/2020 9:41 AM, Edited 1/22/2020 9:57 AM
Hi Werner,
In order to get the entry count per category you have to enable that feature of the tag with a parameter of
entry_count="true"
because it makes the query weightier (It's in the docs, but I could probably be clearer on that).{exp:category_construct:categories group_id="7" entry_count="true" } {construct:cat_name} ({construct:entry_count}) {/exp:category_construct:categories}
- Octave 2 Media
Replied 1/22/2020 9:57 AM
Thank you TJ
Works. Have overseen this in the docs.
Werner