On Thu, Jan 20, 2000 at 11:34:55AM +0100, Jeroen Baekelandt wrote:
Hi,
I'm desperately trying to understand how to make the CaptionedImage as an example to use Renderable Base ZClass. I just can't get it to work, because I don't really know how to start (me-is-really-new-to-Zope).
So I add a product MyImage and add a ZClass to it. The ZClass subclasses Image and Renderable. I got that far. Could somebody explain how to continue? What i basically want is an ordinary Image (with the normal properties) + one extra: the caption, that gets rendered just below the image.
Add a method called render in your ZClass with something like: <center> <dtml-var tag><br> <dtml-var caption></center> The tag method is inherited from the Image class; it returns an appropriate <IMG> tag for an Image and is used when an Image is "rendered". -- Stephen Pitts smpitts@midsouth.rr.com webmaster - http://www.mschess.org