x results per row in Smarty
Posted: Sat Nov 18, 2006 2:07 pm
Alright, this might be a little hard to explan so I'll use a quick ASCII diagram:
This is what is currently prints:
x
x
x
x
x
x
x
This is how I wish for it to be:
x x x
x x x
x x x
x x x
x x x
(Where the number of x's per row can be manually set)
Is there anyway in smarty to do this? Here is my current smarty code:
This is what is currently prints:
x
x
x
x
x
x
x
This is how I wish for it to be:
x x x
x x x
x x x
x x x
x x x
(Where the number of x's per row can be manually set)
Is there anyway in smarty to do this? Here is my current smarty code:
Code: Select all
{section name=i loop=$categorys}
<tr onclick="location.href='{$url_prefix}cats.php?action=view_cat&cat_id={$categorys[i].cat_id}'" onmouseover="style.backgroundColor='#FF0';" onmouseout="style.backgroundColor='transparent';">
<td><b>{$categorys[i].name}</b></td>
<td>{$categorys[i].description}</td>
</tr>
{/section}