[Zope] Using images from my_Product
Dieter Maurer
dieter@handshake.de
Sat, 9 Feb 2002 13:56:17 +0100
Luis =?iso-8859-1?Q?Mart=EDn_Arga=F1araz?= writes:
> I have the next structure in my product My_Product
>
> /My_Product
> /www
> /page.dtml
> ...
> /img
> /my_img.gif
> ...
> /My_Pruduct.py
> ...
>
> I've define in My_Product.py a python class with the same name and
> inside this class I define what I show next:
>
> my_img = ImageFile('img/my_img.gif', globals())
>
> In page.dtml I try to insert my_img with this sintax:
>
> <dtml-var my_img>
>
> This doesn't work. my_img appear as a broken image when I saw page.dtml
Look at the generated URL (e.g. viewing the HTML source code).
What do you see?
The file should have been found successfully. Otherwise, you
should have gotten a startup exception (did you activate Zope logging
and checked the log file?).
Do you call "page.dtml" in the context of one of you "My_Product" instances?
If not, "my_img" will not be known.
Dieter