Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Links Loop Question

Quote Reply
Links Loop Question
On my directory users have a single link that is placed in multiple categories. I need to be able to have them get Featured Link status (listed before regular links), but for specific categories only. I would like to have one field for the link that uses checkboxes to designate those categories where the link has featured status. So, if a Link has a field called Featured_Category it would have multiple values like California, New York, Florida, etc.

Then, as an example, I would like to set the category template for Florida with the following loop:

<%if links%>

Featured:

<%loop links_loop%>
<%if Link_Featured like 'Florida'%>
<%include link.html%>
<%endif%>
<%endloop%>

Regular Listings:

<%loop links_loop%>
<%if Link_Featured not like 'Florida'%>
<%include link.html%>
<%endif%>
<%endloop%>

<%endif%>


The first loop works fine. If a link is in both California and Florida, it will find that the Link_Featured field includes the value Florida and will display it. My problem is in the second loop as there doesn't seem to be a comparison "not like", and it will display the Featured Link again (something I don't want to do) Does anyone know how to do a comparison that would be the opposite of "like"?, or is there some way to set the second loop so that it won't include the Featured Link in the regular listings section? Thanks in advance for any advice tips, etc.!

--Rover
Quote Reply
Re: [rover] Links Loop Question In reply to
Try:

<%unless Link_Featured like 'Florida'%>
...
<%endunless%>

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Links Loop Question In reply to
Thanks! I'll give that a whirl. I really appreciate it. Smile

-Rover