![]() |
related products formatting
Hello,
I've been tweaking my product page significantly and after positioning the related products tpl where I wanted it and changing the {section} statement for the looping in order to display the items horizontally, I noticed that 3 related items fit nicely, but when there are 4, it stretches my template table. What I would like to do is have the a new row start after 3 items, but I'm having a little trouble. Here is the code for my related_products.tpl: {* $Id: related_products.tpl,v 1.10.2.1 2004/10/07 10:52:42 max Exp $ *} {if $product_links ne ""} {*capture name=menu*} <TABLE class="prdpage" cellspacing="0" align="left" cellpadding="0" bgcolor="ffffff" width="345"> <TR> {section name=cat_num loop=$product_links} <TD valign="top"> <table class="prdpage" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="one" width="100"><A href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>{include file="modules/Upselling_Products/product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=100}</A></td> <td width="15"> </td> </tr> <tr> <td width="100"><A href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>{ $product_links[cat_num].product}</A></td> <td width="15"> </td> </tr> </table> </TD>{/section} </TR> </TABLE> {*/capture*} {*include file="menu.tpl" menu_title=$lng.lbl_related_products menu_content=$smarty.capture.menu *} {/if} Here is a link showing the problem in action: http://thehomeloft.com/basket/product.php?productid=16230 Thanks!! |
Re: related products formatting
I wonder if the key is in the section statement, or if there is and "if" statement that would begin a new row after 3 related items?
|
All times are GMT -8. The time now is 09:32 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.