[ic] one image -- multiple items question

Ed LaFrance interchange-users@lists.akopia.com
Tue Jul 31 12:27:01 2001


At 12:15 PM 07/30/2001 -0700, you wrote:
>I have multiple items that share a single image. What I want to do is
>create a results page that looks like this:
>
>----------+---------------
>IM        |   Product 1-A
>   AG      |   Product 1-B
>     E-    |   Product 1-C
>       1   |   Product 1-D
>----------+---------------
>IM        |   Product 2-A
>   AG      |   Product 2-B
>     E-    |   Product 2-C
>       2   |   Product 2-D
>----------+---------------
>
>On the right hand side the names of the products as check boxes, which I
>already know how to implement.
>
>What tags do I need to look at for implementing something like this?

Assuming the image file names are stored in your products table, you could 
use sorting in combination with the [item-change marker] tag pair to create 
this grouping.  For instance, add these terms to your search specifications:

         tf=image        #or thumb, or whatever the name of the relevant 
field for image names is
         to=f

..that would sort the results by image name, then within the results page:

<table>
         <tr><td colspan=2>
         [search-list]
         [item-change image][condition][item-field image][/condition]
         </td></tr>
         <tr><td>
                 <img src="[item-field image]">
         </td><td>
         [/item-change image]
         [item-code]<br>
         [/search-list]
         </td></tr>
</table>

...would give you a rough approximation of the structure you want.  Of 
course, the 'groups' would be sorted alphanumerically by image name; if you 
desire a different order you would need a display order field which could 
be used to control the presentation order of the groups without violating 
their integrity.

- Ed L.



>--
>Richard Seymour : Anarchy Software, Inc.
>- * - - * - - - * -+- * - - - * - - * -
>       `°º¤ø,¸             ¸,ø¤º°'
>              `°º¤ø,¸¸,ø¤º°
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================