Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Loop Problem: Edit Log

Here is the list of edits for this post
Loop Problem
I have a global that returns all the top level categories for display on any page.

I also use this in the category template:

<%set CN = $ID%>
<%TopL_Cats%>
<%loop TopLCats%>
<%if CN =1%><a href="<%URL%>" class="hlight"><%else%><a href="<%URL%>"><%endif%><%Name%></a>
<%endloop%>

What I'm trying to do is highlight the current category, but this only highlights ALL the category Names on that category page.

For example,

In the category page Computing I set the ID to CN.
The loop should see that CN = 1
Now the loop should use the class=hlight, else donít.

Does this makes sense because it doesn't work!

--------------------------------
Privacy Software

Last edited by:

BLOOD: Jan 19, 2006, 2:23 AM

Edit Log: