[Zope] Using "global" images in /root/subfolder

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Wed, 20 Oct 1999 08:03:58 +1000 (EST)


On Tue, 19 Oct 1999, Stefan Hoffmeister wrote:

>           <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?

If you want to pass the img parameter to the globalImage method, may be
able to use the following form:
    <dtml-var "globalImage(img='mail_png')">

In this form, the globalImage method does not get passed an object to
work on (this()) or the current REQUEST so a there will be a number of
operations you won't be able to do (eg. call PARENTS[1]) but it
shouldn't matter in this case. The alternative syntax would be:
    <dtml-var "globalImage(this(),REQUEST,img='mail_png')">

 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen