How to put custom class depending on hierarchical?
-
Hello everybody,
I’m trying to customize the Categories wideget a little bit. What I want is to add a little image (little dots in “L” shape) to the left of the sub-categories links. I’ve already done it but on categories with more than one child categories, the same image is displayed and I would like to ose another image (like a rotated “T”) until I reach the last child when the first image is used.
The problem with this is that every child has the same classes: one generic and one with the category ID at the end. Is there a way of adding a third class? This 3rd class should be something like “not-last-child” or “last-child”.
My guess is that I should use an “IF” or “DO WHILE” conditional somewhere, but I really don’t know where. Any ideas?
Thanks in advance!
- The topic ‘How to put custom class depending on hierarchical?’ is closed to new replies.