Q: How can i check the existence of an image?
4 Jan
2002
4 Jan
'02
11:25 a.m.
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=id> 'Build the image file name <dtml-let MyID="'theme_'+myTemp+'.gif'"> 'loop over each image in the image folder <dtml-in expr="images.objectValues('Image')"> ' String find <dtml-if "_.string.find(id(),MyID) > -1"> ' -> if there is a matching file print image in HTML <img src="/images/<dtml-var id>" width="145" height="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="images.<image_name>"> TIA Gruesse Andreas Pelzner, AixVision GmbH,
8858
Age (days ago)
8858
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andreas Pelzner