[Zope-dev] dtml: "where am I? who am I?"

Lalo Martins lalo@webcom.com
Wed, 24 Nov 1999 18:41:10 -0200


Is there a way for a method (dtml or python, whatever) to know
its location? Say:

foo (folder)
 +--- bar (folder)
 |     +--- my_method (DTML|python method)
 +--- gee (folder)
       +--- index_html

if gee/index_html calls my_method, it doesn't know it's inside
``bar'' so it messes up any relative URL it spits.

The practical case where this is bothering me is the Banner
product. The Banner objects reside inside a BannerFolder which
does the banner rotation. But if some method/document not in
the same folder as the BannerFolder calls it, the Banner
objects will freak out (and not show an image).

[]s,
                                               |alo
                                               +----
--
      I am Lalo of deB-org. You will be freed.
                 Resistance is futile.

http://www.webcom.com/lalo      mailto:lalo@webcom.com
                 pgp key in the web page

Debian GNU/Linux       ---       http://www.debian.org
Brazil of Darkness   --   http://zope.gf.com.br/BroDar