Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

display thumbnail horizontally

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-05-2005, 02:36 PM
 
gallica gallica is offline
 

Member
  
Join Date: Aug 2005
Posts: 26
 

Default 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}
__________________
Xcart 4.018
Heavily moded
http://www.france-modelisme.com
Reply With Quote
  #2  
Old 09-05-2005, 08:11 PM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default

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}
Reply With Quote
  #3  
Old 09-06-2005, 10:15 AM
 
gallica gallica is offline
 

Member
  
Join Date: Aug 2005
Posts: 26
 

Default

Hey Dongan, you're right. That works. How you know that trick ?
__________________
Xcart 4.018
Heavily moded
http://www.france-modelisme.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:48 AM.

   

 
X-Cart forums © 2001-2020