[Zope] simple DTML-VAR question for Images

Dieter Maurer dieter@handshake.de
Sat, 24 Mar 2001 21:37:54 +0100 (CET)


Jaymer writes:
 > So, if I'm in my standard footer, for example, and I want to display an
 > image, but the image is located in a SUBDIRECTORY, then how can I
 > reference that Image Object since it is "below" my current path and the
 > <DTML-var> acquisition stuff won't work?
 > 
 > It makes sense to place all images in a common subdir, and I 
 > obviously don't want to hardcode the path into the footer.   I've 
 > seen the way squishdot uses their advertising method, for example, to
 > place a banner add and link at the top... but I don't want to do through
 > all that.
Collecting objects according to type in folders is not
very Zope friendly. It is much better to group all objects
required for a (sub-)application (or task) together in a folder:

  organisation according to task rather than according to type!

That said, you can use:

     <dtml-with SUBDIRECTORY>
       <dtml-var image>
     </dtml-with>

Dieter