[ZPT] trying to write an image folder page...
Marc Lindahl
marc at bowery.com
Mon May 26 12:44:47 EDT 2003
You should check out my CMFPhotoAlbum (or the ZPhotoAlbum from which
it's based), used with Image_corePatch. Does exactly that
(http://www.zope.org/Members/bowerymarc)
On Sunday, May 25, 2003, at 09:42 AM, Pete Phillips wrote:
> 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>
>
>
> _______________________________________________
> ZPT mailing list
> ZPT at zope.org
> http://mail.zope.org/mailman/listinfo/zpt
More information about the ZPT
mailing list