Category Icons

Yep, that seems to be the way to go given that sub-category slugs in different parent categories do not not have to be unique.

Having said that, it can actually be turned to advantage as a feature. For example if you have group based categories many of which have a help and announcement forums as subcategories then you can easily set up a common help icon for all the help categories and a common icon for all announcement categories using just two entries. And any new subcategories with the help tag would pick up the icon automatically.

For our use I have taken this one stage further and actually made it an option for a partial match on the slug so that an entry “help,question-mark,#000080,false” would match “sw-help” and “help-forum” and “helpdesk”.

The “false” additional item on the end of the entry tells it not to enforce an exact match.

I also have the option to specify the colour as “catcol” in which case the icon will pick up the category colour instead of using a separate specified one.

Two suggestions for inclusion in an update for you.

3 Likes