[Zope] syntax of ExtImage

Dieter Maurer dieter@handshake.de
Sun, 24 Jun 2001 23:14:06 +0200 (CEST)


Mike Bunyan writes:
 > I have been unable to follow the syntax of ExtImage class
 > When called in the same folder in which it exists
 > <dtml-var mgscrdrbit.png>
 > returns
 > <ExtImage instance at 019D8AD0>
It appears to have no useful "__str__" method.

Try:

	<dtml-with mgscrdrbit.png><dtml-var tag></dtml-with>

This will work, it is has a "tag" method (as images normally have).


 > in addition, if called from lower down the tree, giving the absolute 
 > pathname
 > <dtml-var /04_es/mgscrdrbit.png>
 > or
 > <dtml-var '/97_swi/bubardot.gif'>
 > produces
 > Error Type: KeyError
 > Error Value: '/97_swi/bubardot.gif'
Of course....

   You do not have a variable named "/04_es/mgscrdrbit.png".
   You use "restrictedTraverse" in such circumstances....

This was an FAQ. E.g. explained in

  URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html




Dieter