8.13. How do I add the thumbnail to the results page?
(Answered by Ed LaFrance & Dan Browning)
It's as easy as <img src="thumb/[item-field thumb]">, but you may want to add a check to see if the image is actually there before you try to display it:
[if file images/thumb/[item-field thumb]]
<img src="thumb/[item-field thumb]">
[/if]
For example:
--- results.html.orig Sat Jun 29 21:25:49 2002
+++ results.html Sat Jun 29 21:28:57 2002
@@ -100,6 +100,7 @@
<table width="90%" border="0" cellspacing="0" cellpadding="3">
<tr class="contentbar2">
+ <td> </td>
<td><b> Product</b></td>
<td align="center"><b>SK/b</td>
<td align="center"><b>Stock</b></td>
@@ -120,6 +121,11 @@
<tr valign="middle">
<td>
+ [if file images/thumb/[item-field thumb]]
+ <img src="thumb/[item-field thumb]">
+ [/if]
+ </td>
+ <td>
<INPUT TYPE=hidden NAME="mv_order_item" VALUE="[item-code]">
<a href="[area [item-code]]">[item-description]</a>
</td>