from the GT::Template docs (which has some examples of many other functions)
Quote:
<%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.
Booleans are on/off values 0/1. So, you'd be able to use them simply as:
<%if last%> or <%ifnot last%>
<%row_num%> is a "counter" which will have the current record number on each iteration through the loop, if you wanted to do something fancy, or control column breaks, or similar. If the loop variable returned 17 records, row_num will increment from 1 to 17 each iteration.
this would be something you'd use if you wanted more than 2 columns, since odd/even would be simpler to use as built in functions.
By using <%first%> and <%last%> ie: <%if first%>, etc, you can open and close tables _cleanly_ inside the loop, rather than outside. There are many reasons to do this, especially if the logic is more complicated than a simple print.
PUGDOG� Enterprises, Inc. The best way to contact me is to
NOT use Email.
Please leave a PM here.