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

Joshua Lanza jlanza@vorsite.com
Mon, 31 Dec 2001 13:48:49 -0800


My question about this is whether it will break some browsers that are
looking for a ".gif" or ".jpg" extension? I'm sure that there must be
some meta data in the files themselves declaring that "I'm a jpg", but I
have avoided "x_jpg" because of this concern. Does anyone know that this
won't pose a problem?

Josh

-----Original Message-----
From: Dirk Datzert [mailto:Dirk.Datzert@rasselstein-hoesch.de]=20
Sent: Monday, December 31, 2001 1:35 PM
To: Roy Mathew
Cc: zope@zope.org
Subject: Re: [Zope] relative path to objects in <dtml-var>

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 )


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -=20
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )