EE 1
EE 2
BW Category Count
Developer
3rd Party (Free)
97 downloads (last 90 days)
Download v1.0
Compatibility
- Multi Site Manager
- Stand Alone Entry Form
- Low Variables
- Better Workflow
- Matrix
Requirements
- jQuery for the Control Panel
Categories
Extension
Tags
BW Category Count is an ExpressionEngine 2.x add-on that adds a {category_count} variable to the {exp:channel:entries} loop. Which show the number of categories assigned to the current entry.
Installation
Put the ext.bw_category_count.php file in ‘/system/expressionengine/third_party/bw_category_count/’, enable the extension in the CP and you’re all set.
Usage
{exp:channel:entries channel='blog'}
{if category_count == 0}
No categories assigned to this post.
{if:else}
{categories backspace='1'}
<a href="{path='blog'}">{category_name}</a>,
{/categories}
{/if}
{/exp:channel:entries}
Parameters
show_group [optional] : The show_group parameter allows you to only count a category if it is in a specific category group, much like how the show_group parameter on the categories-loop works.
{category_count show_group='1'}
{category_count show_group='1|3|4'}
{category_count show_group='not 2'}
{category_count show_group='not 2|3'}
Download BW Category Count
| EE Version | Downloads | Add-On Version | Release Date |
|---|---|---|---|
| 2.+ | Download | 1.0 | 2010-11-16 02:00 AM |
BW Category Count Links
Hooks Used
If the add-on is an extension, and ties into ExpressionEngine's core files, it will use ExpressionEngine hooks. We are listing any hooks the add-on uses for developers to have an easier time locating other add-ons that they can reference for their own work.
This entry was created November 16, 2010, 12:14 pm.
This entry was last updated June 8, 2011, 9:27 am.
Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!
1 Review:
Brett Burwell 03.21.13
Worked brilliantly for a situation where I needed to check for the existence of a category before running through EE’s native {categories} variable pair.