[Zope] relative path to objects in <dtml-var>

Dirk Datzert Dirk.Datzert@rasselstein-hoesch.de
Mon, 31 Dec 2001 22:35:11 +0100


Hi Roy,

your problem maybe the dot in the filename x.gif, x.png !? This is not allowed
in a pyhton expression.

Make a TransparentFolder named Images in the root / .
Put your graphics into Images named x_gif and x_png and you should can call them
in every dtml like

<dtml-var x_gif> or <dtml-var x_png>

Regards,
Dirk

Roy Mathew schrieb:

> Folks,
>
> I am trying to use acquisition to include images in my webpages. My intent
> is to have a central directory of Images, and several other hierararchies
> of Zope objects that use those images.
>
> For example, witness the following structure:
>
>   Images/gifs/x.gif
>   Images/pngs/x.png
>   Content/A/page1_dtml  (contains: <dtml-var x.gif>)
>   Content/B/page1_dtml  (contains: <dtml-var x.png>)
>
> My understanding of using pathnames in acquisition, is that one needs
> to insert the minimum relative path to the images from a reachable
> parent folder, that one can get away with, somewhere in the referring URL.
>
> Now, if I use the URL
>   http://localhost/Content/Images/gifs/A/page1_dtml
> OR
>   http://localhost/Content/Images/pngs/B/page1_dtml
> thing work fine.
>
> What I would really like to do is be able to specify the paths to the images
> inside
> of the dtml file itself, something like:
>   Content/A/page1_dtml  (contains: <dtml-var Images/gifs/x.gif>)
>   Content/B/page1_dtml  (contains: <dtml-var Images/pngs/x.png>)
>
> so that my URLS can be simpler, like:
>   http://localhost/Content/A/page1_dtml
>   http://localhost/Content/B/page1_dtml
> and still find the gifs.
>
> But this fails in ZOPE; can someone show me the light please!
>
> Thanks,
> Roy Mathew.
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )