BW Category Count

Developer

Wouter Vervloet - Baseworks

3rd Party (Free)

597 downloads (last 90 days)

Creative Commons Attribution Share Alike Download v1.0

EE Version Support

  • ExpressionEngine 2

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)

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 Support Downloads Add-On Version Release Date
Not Specified Download 1.0 Nov 16, 2010

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 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!

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.

2 Reviews:

Loughlin 06.18.13

Loughlin
Rating - {addon_rating_average}

How is this not part of the core functionality of Expression Engine???  This is great little extension, I use it ALL the time - works great

Brett Burwell 03.21.13

Brett Burwell
Rating - {addon_rating_average}

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.