My code for GWcode Categories add-on looks like:

{exp:gwcode_categories group_id="4" cat_url_title="{segment_2}" last_only="yes" class="list-plain" class_current="current_category"}
<a href="{path="{segment_1}/{complete_path}"}">{cat_name}</a>

Based on Nick suggestion I have used GWcode CatMenu add-on

{exp:gwcode_catmenu group_id="4" cat_url_title="{segment_2}" min_depth="2" class="list-plain"}
<a href="{path="{segment_1}/{complete_path}"}"
{if active} class="current"{/if}>

but I have no clue why on current category class is not added.


2 Answers 2


Looks like you need the GW CatMenu add-on; class_current isn't listed in the docs for GW Categories.

  • I have try to use that add-on but with that code {exp:gwcode_catmenu group_id="4" cat_url_title="{segment_2}" depth_open="2" class="list-plain"} I'm getting all categories from group 4 instead only child categories whatever is under parent category based on URL. Commented Feb 18, 2014 at 17:30
  • Please check OP for edits. Commented Feb 18, 2014 at 17:43

As I wasn't able to get GW CatMenu output categories in a way I want, I have decided to go back to GW Categories and use logic below to indicate active/current category:

{exp:gwcode_categories group_id="4" cat_url_title="{segment_2}" last_only="yes" class="list-plain"}
{if "{segment_3}"=="{cat_url_title}"}{cat_name}
<a href="{path="{segment_1}/{complete_path}"}">{cat_name}</a>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.