Entry Category Count
Developer
3rd Party (Free)
EE Version Support
- ExpressionEngine 1.x
Compatibility
If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.
- Updater
- Multi Site Manager
- Stand Alone Entry Form
- Low Variables
- Content Elements
- Better Workflow
- Matrix
- Grid
- Webservice
- Publisher
Requirements
- jQuery for the Control Panel
Add-On Type(s)
Plugin
Tags
Occasionally you want to only display something based on the number of categories that is assigned to a particular entry. This is a small plugin that grabs that number and allows the use of it in conditional statements.
Sample Usage:
Total Assigned Categories: {exp:entry_category_count entry_id="{entry_id}"}
{if {exp:entry_category_count entry_id="{entry_id}"} > 1}
There are multiple categories assigned to this entry
{/if}
{if {exp:entry_category_count entry_id="{entry_id}"} == 0}
There are no categories assigned to this entry
{/if}
You can hardcode in an entry ID if you like
{if {exp:entry_category_count entry_id="124"} > 1}
Your very awesome code here
{/if}
Entry Category Count Links
This entry was created February 8, 2010, 6:57 am.
This entry was last updated March 27, 2010, 12:30 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!
Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.
1 Review:
Jérôme Coupé 06.24.11
Does what is says. Very useful in some cases. I needed it for EE2, so I have ported it. Reviewed by Erik https://github.com/jeromecoupe/jco_entry_catcount