[Zope] Extending Image via ZClass

James W. Howe jwh@allencreek.com
Wed, 19 Jan 2000 11:11:51 -0500


I'm working on creating an extension to Image which will allow a person to 
include caption and attribution information for an image.  I'm calling this 
a CaptionedImage for lack of a better name.  I've created the ZClass and 
added property sheets and defined some methods for my views.  What I don't 
know how to do, however, is modify the way the object renders itself by 
default.  For example, if I use the following:

<dtml-var CaptionedImageObjectInstance>

I get an img tag for the image associated with my object.  What I want to 
be able to do is generate my own tags so as to include caption and 
attribution information in a standard format.  How can I do this?

Relatedly, does Zope support the notion of "super" in determine which code 
to evaluate.  For example, in my CaptionedImage object, I would like to 
override the default behavior of view_image_or_file, but only if caption 
information was specified.  If no caption information was specified, I 
would like to let the superclass version of the method be executed.  Is 
there a way to do this?

Thanks.

James W. Howe				mailto:jwh@allencreek.com
Allen Creek Software, Inc.		pgpkey: http://ic.net/~jwh/pgpkey.html		
Ann Arbor, MI  48103