Latest Register Log In

+ Advanced Search


Multicolored Category Selector
Aug 24, 2004 (Edited Mar 11, 2014)

Suppose you want each depth level in your category selector to have a different color, to stand out. If you're using the non-level-based selector (make sure Admin -> Settings -> Switches -> Level-based category selector is off), you can do so. Go to Admin Panel -> Categories -> Category Settings -> "Category selector options HTML:" and change the value to
<option value="{CATID}" class="selectcolor{CATINDENT}">{CATINDENT} {CATNAME}</option>

Then go to Admin -> Themes -> Manage Templates -> Stylesheet and add this at the bottom:

option.selectcolor { background-color: green; }
option.selectcolor- { background-color: blue; }
option.selectcolor-- { background-color: red; }

Continue adding lines for as many levels of indentation as you have.

Note: If you use a different indentation character than the hyphen, you will have to replace the hyphens with your character in the stylesheet.

Did this article fail to fully answer your questions? If so, please ask for clarification.

Your E-mail:
(needed so that you can get your answer!)
Confirm E-mail:
(same as above to prevent typos)

Description Use different colors for each layer of depth in your category selector, to distinguish them.
Views 1,338 views. Averaging 0 views per day.

Previous Article | Next Article