Miscellaneous
Just a quick explanation on how to highlight the active category in the category list:
- First you add the category to the tage of your front page (= Main Index skin) with:
<body<%if(category)%> id="<%category%>"<%else%><%endif%>>
This way, if a site visitor decides to look at posts from a certain category, the webpage body will have the accompanying categoryname as id.
- Then you have to make sure that the selected categoryname can be highlighted in the list of all categories you created. In order to achieve that, you have to modify the Category List Item template you use with the above-mentioned skin. make it look like this (the class="<%catname%>" part is what I added):
<li><a href="<%catlink%>" class="<%catname%>"><%catname%></a></li>
- Now you only need to decide how you want to visually highlight the selected category. Change your stylesheet, located in yoursite.com/skins/skinname (?), and add something like:
Code:
body#categorynameB a.categorynameA, body#categorynameB a.categorynameB, body#categorynameC a.categorynameC, etc... {
background-color: yellow;
}
(Yes, you have to add every categoryname to the latest code example. Sorry ;) )
Well, did that work for you?
section: Miscellaneous | submitted by
roel on 2004.Nov.11 | 4674 views

Total votes: 16 - Rating: 6.31