[Zope] image manipulation in tables

Bill Kerr kerrb@senet.com.au
Sun, 12 May 2002 11:03:30 +0930


From: "Dieter Maurer" <dieter@handshake.de>
> Bill Kerr writes:
>  > this code creates a table with images in the first column and captions
in
>  > the second column
>  > (images from a folder called Personal)
>  > how could I rewrite it so images go in the first row and captions in
the
>  > second row?
>  >
>  > <dtml-in expr="Personal.objectValues('Image')">
>  > <tr>
>  >   <td>
>  >       <dtml-var sequence-item>
>  >    </td>
>  >   <td>
>  >       <dtml-var title>
>  >    </td>
>  > </tr>
>  > </dtml-in>
>  >
>  > it seems hard to me
> Not sure, what you want precisely:
>
>   But inserting "</tr><tr>" after the first "</td>" would use
>   two rows per image.

 what I want is for all the images to go across the page in the first row
and all the captions across the page in the second row -- actually I did
work it out eventually with the help of some private mail, the solution is:

<table border="1" cellpadding="4">
<tr>
<dtml-in expr="Personal.objectValues('Image')">
  <td>
      <dtml-var sequence-item>
   </td>
</dtml-in>
</tr>
<tr>
<dtml-in expr="Personal.objectValues('Image')">
  <td>
      <dtml-var title>
   </td>
</dtml-in>
</tr>
</table>

this creates a 2 x 2 table with the caption under each picture, for two pics
-- Bill


>
>
> Dieter