On Sun, 15 Oct 2000, Noah wrote:

> I'm a Zope beginner. I'm trying to create an ImageTemplate ZClass. This will work
> similar to an Image, but the user can insert it directly in DTML using <dtml-var 
> and it will get expanded into HTML (with formatting, <img> tag, caption, etc.)

FWIW the Image object does exactly that already.

> 2. The Publisher does not call the view method (index_html) of the object!
> Instead it calls str() which is __str__ in Image and that calls Image.tag().
> I can't overload __str__ because Zope does not allow a method to start
> with _ underscore.

This is the way it works! For creating ZClasses that render on __str__
see http://www.zope.org/Members/lalo/Renderable-ZClass


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to