rendering graphics from an external product
Hi, I have this class (with subclasses) in an external product: class Elem_base_item(ObjectManager,Implicit,Persistent,SimpleItem.SimpleItem): "Eba item" meta_type="eba_item" def __init__(self,id,kop,tekst,volgorde,auteur,status,slot,type, kopstijl,tekststijl,auto_br,datum): self.id=id self.kop=kop etc.... The whole thing works great but I need to possibility to add images to the Elem_base_item class. I came up with this: def addImg(self,f_file,REQUEST=None): "voegt een afbeelding toe" self.manage_addImage('afbeelding',title='afbeelding',file=f_file) self._p_changed = 1 This works in one respect: that it adds an object to Elem_base_item class. But it won't render it as an image. I get an broken image in the browser while using this dtml: <dtml-if afbeelding> <dtml-var afbeelding> </dtml-if> Clearly I'm missing something. Can someone enlighten me? Henny I came up with this:
<dtml-if afbeelding> <dtml-var afbeelding> </dtml-if>
Clearly I'm missing something. Can someone enlighten me?
<dtml-if afbeelding> <dtml-var "_.afbeelding.tag"> </dtml-if> or something like that, i can't remember exact dtml syntax. in zpt it would be <img tal:replace="here/afbeelding/tag" />
participants (2)
-
Henny van der Linde -
Sergey Volobuev