GWcode CatMenu (Legacy)

http://gwcode.com/assets/img/add-ons/tn/gwcode-catmenu.gif

This plugin aims to make creating dynamic multi-level category menus with ExpressionEngine as easy and flexible as possible. It adds "active" and "open" classes to the menu tree where it needs to so you can easily highlight those with CSS. There's a version for both ExpressionEngine 1 & 2 and it's Multi Site Manager compatible.

A common problem seen on the ExpressionEngine forums and Twitter #eecms hashtag:

When a user clicks a parent category link on the resulting page I need to automatically display a list of child categories based on the parent category page visited.

That is exactly what this plugin does. It allows you to create a dynamic multi-level category menu for:

  • an entry, by using the entry_id or url_title parameter. It will then create the menu and open up the categories in the menu where the entry has been added to;
  • one or more categories, by using the cat_id or cat_url_title parameter. It will then open up those categories in the menu and show possible child categories;
  • one or more channels or category groups, by using the channel, channel_id or group_id parameter.

You can use any combination of the parameters mentioned above. For example, you could use both the group_id and cat_id parameters to create a combined menu for two category groups and open up one or more categories.

It's also possible to:

  • have categories with a certain depth in the tree open up by using the depth_open or active_depth_open parameters;
  • define the order in which category groups should be displayed in the menu with the group_id parameter. For example, a menu created with group_id="1|2" is in a different order compared to a menu created with group_id="2|1"
  • show the number of entries (with or without a certain status) that have been posted in each category, by using the entry_count variable in combination with the entry_count or status parameter;
  • use a <ol> tag instead of <ul> tag for the menu, by using the list_type parameter;
  • add a CSS class or id to the menu ul or ol tag with the id and class parameters;
  • override the names of the classes used for open or active categories, or don't have them added at all;
  • use variable conditionals so that you'll be able to link to a different template just for last child categories, or add a CSS class to the last child category hyperlinks for example.