[ZPT] trying to write an image folder page...
Pete Phillips
pete at smtl.co.uk
Sun May 25 15:42:53 EDT 2003
Hi
I am trying to write a zope page into which our staff can upload images
of wounds, and which will automatically create thumbnail images, and
display them in rows (using a table) so that I can get 4 thumbnail
images per row.
My problem is that it doesn't make sense to me why the first row will
only have 2 images, whilst the rest are OK at 4 images per row. For
example, I currently have 15 images in the folder, and they come out
like this:
1 2
3 4 5 6
7 8 9 10
11 12 13 14
15
What I want is:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 etc etc.
Code at the end - any thoughts appreciated:
Regards,
Pete
--
Pete Phillips, Deputy Director, | http://www.smtl.co.uk/
Surgical Materials Testing Lab, | http://www.worldwidewounds.com/
Princess of Wales Hospital, S Wales | http://www.dressings.org/
Tel/Fax: +44 1656-752820/30 | pete at smtl.co.uk
<!-- Link to Header (Top Panel) -->
<dtml-var standard_html_header>
<!-- Body Text -->
<h1 align="center"><i>LarvE<sup>®</sup></i> Photos</h1>
<p> <b>Please note - some of the pictures on this page may not be suitable
for those not used to wounds.</b>
</p>
<p align="center">Click on a picture to enlarge it:</p>
<br>
<!-- Display Thumbnails -->
<dtml-if updateThumbnails>
<dtml-call makeThumbnails>
</dtml-if>
<table align=center><tbody>
<tr align=center>
<dtml-in expr="photos.objectValues('Image')">
<dtml-let num=sequence-index
result="num%4">
<dtml-if original_id>
<td align=center>
<a href="&dtml-original_id;"><dtml-var sequence-item></a><br>
<dtml-var original_id>
<dtml-var "result">
</td>
<dtml-if expr="result">
<dtml-else>
</tr>
<tr align=center>
</dtml-if>
</dtml-if>
</dtml-let>
</dtml-in>
</tr></tbody>
</table>
<!-- End of Thumbnails -->
<!-- Update Thumbnails form -->
<form><div align=center>
<input type="submit" name="updateThumbnails" value="Update Thumbnails">
</div align=center></form>
<!-- Link to Footer -->
<dtml-var standard_html_footer>
More information about the ZPT
mailing list