resrec99 Posted January 10, 2008 Share Posted January 10, 2008 Is there any way of having all downloads listed throughout 3 columns instead of having them all listed in a single column? i.e. Instead of having: 1 2 3 4 5 etc... I would like to see: 1 2 3 4 5 6 7 8 etc.. I have tried adding <td>download_info</td> to the template file but all i get is 3 columns with exactly the same information in each cell. Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
angelcosta Posted February 12, 2008 Share Posted February 12, 2008 <table width="100%"> <tr> {foreach key=num item=download from=$downloads} <td> {$download.type} <a href="{$download.link}"><strong>{$download.title}</strong></a><br />{if $download.clientsonly}<i>Login Required</i><br />{/if}{$download.description}<br /><font style="color:#A8A8A8;font-size:10px;">{$LANG.downloadsfilesize}: {$download.filesize}</font> </td> {if $num is div by 4} </tr> <tr> {/if} {/foreach} </table> I still have to fix that one single file in the first row... 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 12, 2008 Share Posted February 12, 2008 In that code, your not closing the </tr> tag at the end 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted February 12, 2008 Share Posted February 12, 2008 And in your reply, you didn't use the correct form of you are... JasonO, he just needs to remove the last <tr>. No need for blank one's to be in the coding. That just causes bloat. 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted February 12, 2008 Share Posted February 12, 2008 How can I do the same for products.tpl? Just link how its done here http://mywhmcs.com/cart.php 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted February 12, 2008 Share Posted February 12, 2008 I didn't use tables for that. But: <table> <tr> <td>left</td> <td>middle</td> <td>right</td> </tr> </table> That's how you'd get a three column table. 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 12, 2008 Share Posted February 12, 2008 That would presume you don't add more products though right? I mean it won't make a new row after X number of products on the first row. I think that's what resrec99 wan'ts to do, and it's a good idea. 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted February 12, 2008 Share Posted February 12, 2008 Here is the code: {foreach key=num item=product from=$products} <div class="cartbox" align="center"> <strong>{$product.name}</strong> {if $product.qty!=""}<em>({$product.qty} {$LANG.orderavailable})</em>{/if}<br /> {if $product.description}{$product.description}<br />{/if} <div style="margin:5px;padding:2px;color:#cc0000;"> {if $product.paytype eq "free"} {$LANG.orderfree} {elseif $product.paytype eq "onetime"} {$product.pricing.onetime} {$LANG.orderpaymenttermonetime} {elseif $product.paytype eq "recurring"} {if $product.pricing.monthly}{$product.pricing.monthly}<br />{/if} {if $product.pricing.quarterly}{$product.pricing.quarterly}<br />{/if} {if $product.pricing.semiannually}{$product.pricing.semiannually}<br />{/if} {if $product.pricing.annually}{$product.pricing.annually}<br />{/if} {if $product.pricing.biennially}{$product.pricing.biennially}<br />{/if} {/if} </div> <div align="center"><input type="button" value="{$LANG.ordernowbutton}"{if $product.qty eq "0"} disabled{/if} onclick="window.location='{$smarty.server.PHP_SELF}?a=add&pid={$product.pid}'" /></div> </div> <br /> {/foreach} How do I align this like yours? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted February 12, 2008 Share Posted February 12, 2008 Nevermind I got it working, I needed a break. 0 Quote Link to comment Share on other sites More sharing options...
angelcosta Posted February 12, 2008 Share Posted February 12, 2008 New code: {if $downloads} <p><strong>{$LANG.downloadsfiles}</strong></p> <table width="100%"> <tr> {foreach key=num item=download from=$downloads} <td width="33%" valign="top">{$download.description}<p>{$download.type} <a href="{$download.link}"><strong>{$download.title}</strong></a><br />{if $download.clientsonly}{if !$loggedin}<i>Exclusivo para clientes</i>{/if}{/if}<br /><font style="color:#A8A8A8;font-size:10px;">{$LANG.downloadsfilesize}: {$download.filesize}</font> </td> {if ($num + 1) is div by 3} </tr> <tr> {/if} {/foreach} </tr> </table> {else} No downloads... {/if} This one shows the correct 3 columns (to change the number of columns change the div by 3, where 3 is the number of columns....) 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted February 17, 2008 Share Posted February 17, 2008 Anyone got any luck? 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 17, 2008 Share Posted February 17, 2008 I haven't been able to have any luck i'm afraid. Did you try the code in the post above yours? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.