EE2 Ready Add-ons »

Plugin

EE 1
EE 2
Entry Category Count

Developer

Erik Reagan

3rd Party (Free)

Creative Commons Attribution Share Alike

Compatibility

  • LG Addon Updater
  • Multi Site Manager
  • Stand Alone Entry Form

Requirements

  • jQuery for the Control Panel
  • Hermes

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 last updated March 27, 2010, 5: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!

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!