[Zope] display an image from a DTML document
Thu, 12 Jun 2003 10:04:19 +0200
I'm a little bit surprised, that you exclude ladys in your question.
Nevertheless I try to answer because I had almost the same problem.
I separated the images into extra dtml-documents an included them with
img tag (<img src="x.html">).
The disadvantage of this approach is that in the point of view of http
more than one document.
Here is an excerpt of the code:
Little document around the Image:
<!-- $Id: thumbNailFrame.dtml $-->
<img src="<dtml-var "displayThumbnail(fileName, REQUEST, RESPONSE)">">
Document that includes the image:
<img src="thumbNailFrame?fileName="emma.gif" alt="Emma" border="0">
Code for displaying the image:
def displayThumbnail(self, fileName, REQUEST, RESPONSE):
""" displayThumbnail """
content = self.readFile(fileName) # file i/o-operations are in
Have a lot of fun with it,