Jump to content

Categories list with unique class for each


Doberman

Recommended Posts

Change line 2 of modules/blockcategories/category-tree-branch.tpl from:

<a href="{$node.link|escape:html:'UTF-8'}" {if $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}



to:

<a href="{$node.link|escape:html:'UTF-8'}" class="cat{$node.id}{if $node.id == $currentCategoryId} selected{/if}" title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}



This will add a "cat1", "cat2", etc class to the categories. You could also make them ids instead, since they will be unique.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...