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 6050 Jan 19, 2006, 2:19 AM
Thread Re: [BLOOD] Loop Problem
tandat 5882 Jan 19, 2006, 2:31 AM
Thread Re: [tandat] Loop Problem
BLOOD 5834 Jan 19, 2006, 9:03 AM
Post Re: [BLOOD] Loop Problem
tandat 5828 Jan 19, 2006, 9:12 AM
Post Re: [BLOOD] Loop Problem
BLOOD 5820 Jan 19, 2006, 10:27 AM
Thread Re: [BLOOD] Loop Problem
webmaster33 5881 Jan 19, 2006, 11:41 AM
Thread Re: [webmaster33] Loop Problem
BLOOD 5850 Jan 19, 2006, 12:17 PM
Thread Re: [BLOOD] Loop Problem
webmaster33 5819 Jan 19, 2006, 12:21 PM
Post Re: [webmaster33] Loop Problem
BLOOD 5879 Jan 19, 2006, 12:42 PM
Thread Re: [BLOOD] Loop Problem
webmaster33 5829 Jan 19, 2006, 1:57 PM
Thread Re: [webmaster33] Loop Problem
BLOOD 5814 Jan 20, 2006, 9:58 AM
Post Re: [BLOOD] Loop Problem
webmaster33 5794 Jan 20, 2006, 4:01 PM