[Zope] Q: How can i check the existence of an image?
Andreas Pelzner
AP@aixvision.com
Fri, 4 Jan 2002 12:25:45 +0100
Hi Zopes,
How can I check the existence on an image file in my image folder. I
coded a workaround, but it doesn't fit my needs exactly:
<dtml-let myTemp=3Did>=20
'Build the image file name
<dtml-let MyID=3D"'theme_'+myTemp+'.gif'">=20
'loop over each image in the image folder
<dtml-in expr=3D"images.objectValues('Image')">
' String find
<dtml-if "_.string.find(id(),MyID) > -1">=20
' -> if there is a matching file print image in HTML
<img src=3D"/images/<dtml-var id>" width=3D"145" height=3D"129"> 'print =
image
in HTML
</dtml-if>
</dtml-in>
</dtml-let>
</dtml-let>
...but I'm looking for something like this:
'check if true or not
<dtml-in expr=3D"images.<image_name>">=20
TIA
Gruesse
Andreas Pelzner, AixVision GmbH,