[Zope] Index_html inside an image zclass
Steve Alexander
steve@cat-box.net
Mon, 08 May 2000 12:22:07 +0100
Brown Fox wrote:
>
> Hello,
> i've added in an image zclass the index_html document.
> This file is shown, but variables are not working,
> starting from the <dtml-var id>.
> Why?
The index_html method of the Image class returns the image data, with
the correct Content-Type header.
From lib/python/OFS/Image.py:
def index_html(self, REQUEST, RESPONSE):
"""
The default view of the contents of a File or Image.
Returns the contents of the file or image. Also, sets the
Content-Type HTTP header to the objects content type.
"""
You'll need to do one of the following:
* Use another name than index_html for your intended purpose.
* Extend Image.py from Python, in your own Python Product.
* Use the Renderable base class:
http://www.zope.org/Members/lalo/Renderable-ZClass
* Write your own ZClass that is an ObjectManager, and have the
image as one of its subobjects.
* Do something with JPicture:
http://www.zope.org/Members/jens/JPicture
--
Steve Alexander
Software Engineer
Cat-Box limited