sure thing - but it does require using H::T::Expr.  I use the following snippet as-is to a gallery of photo's.  Notice the use of modulo (%).


<table width=100% border=0 cellpadding=1 cellspacing=1>
        <TMPL_LOOP gallery>
                <TMPL_IF EXPR="(__counter__ % 3) == 1">
                        <tr valign=top>
                        <td width=33% align=center valign=top class=text>
                                <a href="<TMPL_VAR>/<TMPL_VAR NAME=filename ESCAPE=URL>" title="Click to enlarge"><img alt="" src="<TMPL_VAR paths.thumbnail>/<TMPL_VAR NAME=filename ESCAPE=URL>" width=180 height=200 border=0></a><br>
                                <<TMPL_VAR spacer> width=10 height=6><br>
                                <TMPL_VAR NAME=description ESCAPE=TEXT>
                <TMPL_IF EXPR="(__counter__ % 3) == 0">
                                <td colspan=3>
                                        <<TMPL_VAR spacer> height=18 width=100%>

Michael Greenish wrote:

I have a series of images that I would like to output but I want to limit it to only 4 images per row.  I would like to put a br tag to force the 5th, 9th, etc... image to go to the next row.  Can I do this completely int the template using an iterator or resettable counter?



Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

This email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Html-template-users mailing list