Home : Gossamer Threads Inc. : Custom Modification Jobs :

Gossamer Threads Inc.: Custom Modification Jobs: Re: [Andy] thumbnails for the links?: Edit Log

Here is the list of edits for this post
Re: [Andy] thumbnails for the links?
If you are using loop variables, just expand the <%if%> portion to do a count of the loop iterations.

From the help pages:

Code:
Also, inside your loop you can use the following tags:


<%row_num%> - a counter for what row is being looped, starts at 1.
<%first%> - boolean that is true if this is the first row, false otherwise.
<%last%> - boolean that is true if this is the last row, false otherwise.
<%inner%> - boolean that is true if this is not first and not last.
<%even%> - boolean is true if row_num is even.
<%odd%> - boolean is true if row_num is odd.

You could use even and odd tags to produce alternating colors like:


<%loop results%>
<tr><td bgcolor="<%if even%>white<%else%>silver<%endif%>">..</td></tr>
<%endloop%>

Also, you can use <%lastloop%> to abort the loop and skip straight to the current
loop's <%endloop%> tag, and <%nextloop%> to load the next loop variables and jump
back to the beginning of the current loop.

The 6 built-in variables (row_num, first, last, ...) and any variables set via the
loop variable will only be available for the current loop iteration, after which
the variables of the next loop iteration will be set, or, for variables that exist
in one iteration but not the next, the variables that existed prior to the loop
being called will be restored.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.

Last edited by:

pugdog: Dec 29, 2002, 7:46 AM

Edit Log: