New Zenner
- Join Date:
- Apr 2007
- Posts:
- 2
- Plugin Contributions:
- 0
Style category links based on hierarchy?
Here's my situation, I am setting up a site to sell photographic images online. I am trying to organize my categories to Veiw By..
My categories currently break down as such.
Photographer (top level)
Photographer Name 1 (second level)Gallery (top level)
Photographer Name 2 (second level)
Photographer Name 3 (second level)
Abstracts (second level)Here's my problem. When ZenCart assigns the class names to the links it doesn't use names like level1, level2, etc. It uses category-top, category-sub and category-product. So, even though categories like Photographer Name and Landscape are at the same level (second level) in the hierarchy they have different class names. And I can't simply apply the same styles to both class names because categories like Beaches and Birds (third level) would also pick it up.
Landscape (second level)Beaches (third level)Wildlife (second level)
Mountains (third level)
Birds (third level)
Mammals (third level)
What I'm trying to do (without success) is to add to the 2nd case statement (line 25) of the switch() function in tpl_categories.php to include an OR statement that says:** if your parent category is the "top" category then set class name to "category-sub".** I just can't seem to figure out the exact statement syntax.
Any programmers out there that can offer a suggestion?