Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Number of Loops

Quote Reply
Number of Loops
Hi-

I searched the forum, but couldn't seem to find out about this. Does anyone know if it possible to set the number of times the loop gets processed for the Link results? In other words, if I want to show a maximum of 5 results, is there a way to set the loop syntax so that it will go through 5 times and then exit? I have Featured Links that I display in a right-hand column using a different link template, and I only want to show up to a max of 5 results.

--Frank
Quote Reply
Re: [FrankM] Number of Loops In reply to
Why not set max hits to 5 in the admin panel?
Quote Reply
Re: [FrankM] Number of Loops In reply to
or you can use something like the below if you insist on using loop:

Code:
<%loop your_loop%>
<%if row_num < 5%>
<%Title%>
<%else%>
<%endloop%>
<%endif%>

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Number of Loops In reply to
Thanks very much! the row_num code worked perfectly. (I wanted to set the max hits to 5 in the admin panel, because my main links display 10 to a page. These are a separate listing of links that are designated as featured and loop in a right column with a different link.html template, and there are a max of 5 for them).

--Frank

Last edited by:

FrankM: Mar 14, 2003, 1:09 PM