View Single Post
  #6  
Old 04-30-2003, 07:55 AM
 
machnhed1 machnhed1 is offline
 

eXpert
  
Join Date: Feb 2003
Location: Illinois
Posts: 274
 

Default

Ok, here's the ultimate chunky code, but it tests each extra field and won't print even a blank row if it there' nothing to print - sort of a modified version of the code above.

Code:
{* $Id: product.tpl,v 1.3 2003/04/30 10:38:01 TSC Exp $ *} {if $extra_fields[0].active eq "Y" and $product.param00 ne ""} <tr> <td valign="top">{$extra_fields[0].field}</td> <td>{$product.param00}</A></td> </tr> {/if} {if $extra_fields[1].active eq "Y" and $product.param01 ne ""} <tr> <td valign="top">{$extra_fields[1].field}</td> <td>{$product.param01}</td> </tr> {/if} {if $extra_fields[2].active eq "Y" and $product.param02 ne ""} <tr> <td valign="top">{$extra_fields[2].field}</td> <td>{$product.param02}</td> </tr> {/if} {if $extra_fields[3].active eq "Y" and $product.param03 ne ""} <tr> <td valign="top">{$extra_fields[3].field}</td> <td>{$product.param03}</td> </tr> {/if} {if $extra_fields[4].active eq "Y" and $product.param04 ne ""} <tr> <td valign="top">{$extra_fields[4].field}</td> <td>{$product.param04}</td> </tr> {/if} {if $extra_fields[5].active eq "Y" and $product.param05 ne ""} <tr> <td valign="top">{$extra_fields[5].field}</td> <td>{$product.param05}</td> </tr> {/if} {if $extra_fields[6].active eq "Y" and $product.param06 ne ""} <tr> <td valign="top">{$extra_fields[6].field}</td> <td>{$product.param06}</td> </tr> {/if} {if $extra_fields[7].active eq "Y" and $product.param07 ne ""} <tr> <td valign="top">{$extra_fields[7].field}</td> <td>{$product.param07}</td> </tr> {/if} {if $extra_fields[8].active eq "Y" and $product.param08 ne ""} <tr> <td valign="top">{$extra_fields[8].field}</td> <td>{$product.param08}</td> </tr> {/if} {if $extra_fields[9].active eq "Y" and $product.param09 ne ""} <tr> <td valign="top">{$extra_fields[9].field}</td> <td>{$product.param09}</td> </tr> {/if}
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat]
Reply With Quote