Gossamer Forum
Quote Reply
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
Subject Author Views Date
Thread Loop Problem BLOOD 3758 Jan 19, 2006, 2:19 AM
Thread Re: [BLOOD] Loop Problem
tandat 3642 Jan 19, 2006, 2:31 AM
Thread Re: [tandat] Loop Problem
BLOOD 3593 Jan 19, 2006, 9:03 AM
Post Re: [BLOOD] Loop Problem
tandat 3588 Jan 19, 2006, 9:12 AM
Post Re: [BLOOD] Loop Problem
BLOOD 3580 Jan 19, 2006, 10:27 AM
Thread Re: [BLOOD] Loop Problem
webmaster33 3630 Jan 19, 2006, 11:41 AM
Thread Re: [webmaster33] Loop Problem
BLOOD 3606 Jan 19, 2006, 12:17 PM
Thread Re: [BLOOD] Loop Problem
webmaster33 3579 Jan 19, 2006, 12:21 PM
Post Re: [webmaster33] Loop Problem
BLOOD 3629 Jan 19, 2006, 12:42 PM
Thread Re: [BLOOD] Loop Problem
webmaster33 3586 Jan 19, 2006, 1:57 PM
Thread Re: [webmaster33] Loop Problem
BLOOD 3557 Jan 20, 2006, 9:58 AM
Post Re: [BLOOD] Loop Problem
webmaster33 3549 Jan 20, 2006, 4:01 PM