[Zope] Using "global" images in /root/subfolder
Stefan Hoffmeister
Stefan.Hoffmeister@Econos.de
Tue, 19 Oct 1999 15:05:56 +0200
: On Tue, 19 Oct 1999 09:33:07 +0200, Martijn Pieters wrote:
>At 05:58 19/10/99 , Stefan Hoffmeister wrote:
>
>>Let's assume the following structure of a site
>>
>> /root
>> /global_images
>> mail_png
>> link_png
>>
>> /content
>> some_content (DTML document)
...
>Code that would solve your problem:
>
> <dtml-with graphics><dtml-var mail_png></dtml-with>
Alright, I am now so far that this works:
/root
globalImage (DTML document)
<dtml-with "graphics">
<dtml-var "_.getitem(img)">
</dtml-with>
/graphics
mail_png
link_png
/content
some_content (DTML document)
<dtml-with "_.namespace(img='mail_png')">
<dtml-var globalImage>
</dtml-with>
But the way I pass the "img" property (attribute?) to the "globalImage"
DTML document (simply injecting it into the document's namespace) appears
to be a bit cumbersome. Is there any more straight-forward way of doing
this, like passing a "parameter" to the DTML document?