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

Roy Mathew roymath@yahoo.com
Mon, 31 Dec 2001 17:14:46 -0800 (PST)


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

Thanks Dirk. However, that is not really what I am asking; In fact, in
this particular case, the name "x.gif" works fine. My question is:
"How would I use a pathname comprising more than one element in a
dtml-var expression. If you read my original message a bit more
thoroughly, you will see an example of that.

>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

I do appreciate the pointer to TransparentFolders; I saw them a
reference to them elsewhere, and it appears that they might be what I
need to use.

Thanks,
Roy.


>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