Extension

EE 1
EE 2
BW Category Count

Developer

Wouter Vervloet - Baseworks

3rd Party (Free)

Creative Commons Attribution Share Alike Download v1.0

Compatibility

Requirements

  • jQuery for the Control Panel

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 01: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.

  1. channel_entries_row

This entry was last updated June 8, 2011, 8: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!

There are no reviews for this add-on yet.

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