Help on coding
Posted: Wed May 06, 2009 8:47 pm
Hi, I would like to add a condition in this code to have the forum insert "</tr><tr>" if the {counter} hits 3, can someone help me? Thank you so much!
Code: Select all
{foreach item="image" from=$records}
<td>
{if $use_fancy_urls}
<a href="listings/view/{$image.make|strip:"-"}/{$image.model|strip:"-"}/
{$image.listingid}/"><img src="{$image.imagethumbpath}" title="{$smarty.const.IMAGE} {counter}"
alt="{$smarty.const.IMAGE} {counter}" /></a><br><br><b>{$image.ad_title}</b><br></td>
{else}
<a href="listings.php?make={$image.make|strip:"-"}&model=
{$image.model|strip:"-"}&id={$image.listingid}"><img src="{$image.imagethumbpath}"
title="{$smarty.const.IMAGE} {counter}" alt="{$smarty.const.IMAGE} {counter}" /></a><br><br><b>
{$image.ad_title}</b><br></td>
{/if}
{/foreach}