X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   display thumbnail horizontally (https://forum.x-cart.com/showthread.php?t=16383)

gallica 09-05-2005 02:36 PM

display thumbnail horizontally
 
Hello everybody,
I'd like to display images horizontally in a loop instead of vertically. Here is my code. If someone expert could give me an help. That would be great to share. Thanks

Here is the code :
Quote:

{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $active_modules.Detailed_Product_Images ne ""}
{capture name=dialog}
<TABLE border="0" {if $productids ne ''}cellspacing="0" cellpadding="2"{else}cellspacing="1" cellpadding="2"{/if} cellspacing="0">
{if $productids ne ''}
{/if}
<TR class="TableHead">
</TR>
{if $images}
{section name=image loop=$images}
<TR{cycle values=", class='TableSubHead'"}>
{if $productids ne ''}{/if}
<TD align="center">[img]{$xcart_web_dir}/product_image.php?imageid={$images[image].imageid}[/img]</TD>
</TR>
{if %image.last%}
{/if}
{/section}
{else}
{/if}
</TR>
</TABLE>
{/capture}
{include file="dialog1.tpl" content=$smarty.capture.dialog extra="width=100%"}
{/if}

Dongan 09-05-2005 08:11 PM

If i am not worng, the loop section should start after the <TR> tag to display the images horizontally.

Code:

{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $active_modules.Detailed_Product_Images ne ""}
{capture name=dialog}
<TABLE border="0" {if $productids ne ''}cellspacing="0" cellpadding="2"{else}cellspacing="1" cellpadding="2"{/if} cellspacing="0">
{if $productids ne ''}
{/if}
<TR class="TableHead">
</TR>
{if $images}
<TR{cycle values=", class='TableSubHead'"}>
{if $productids ne ''}{/if}
{section name=image loop=$images} 
<TD align="center">[img]{$xcart_web_dir}/product_image.php?imageid={$images[image].imageid}[/img]
{/section}
</TD>
</TR>
{if %image.last%}
{/if}
{else}
{/if}
</TR>
</TABLE>
{/capture}
{include file="dialog1.tpl" content=$smarty.capture.dialog extra="width=100%"}
{/if}


gallica 09-06-2005 10:15 AM

Hey Dongan, you're right. That works. How you know that trick ?


All times are GMT -8. The time now is 07:27 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.