Here's a copy/paste that is working in 4.1.7
Code:
{* $Id: related_products.tpl,v 1.15 2005/12/07 14:07:32 max Exp $ *}
{if $product_links ne ""}
{capture name=dialog}
{section name=cat_num loop=$product_links}
{ if %cat_num.first% }<table>{/if}
{if $smarty.section.cat_num.index is div by 3} </tr><tr valign="top">{/if}
<td align=center>
<a href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Upselling_Products.upselling_new_window eq 'Y'} target="_blank"{/if} class="ItemsList">{include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=75 product=$product_links.product}<br />
{$product_links[cat_num].product}</a></li>
</td>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra='width="100%"'}
{/if}