[Zope] img src (newbie)

Alexandre Ratti alex@gabuzomeu.net
Thu, 23 Mar 2000 12:47:49 +0100


Hello,


At 11:08 22/03/2000 -0800, you wrote:
>Date: Wed, 22 Mar 2000 11:41:11 -0700
>From: Ken Kinder <kkinder@messagemedia.com>
>Subject: Re: [Zope] img src (newbie)
(...)

>Say, for example, you uploaded an image called foo_jpg (Zope does not
>allow dots in object names). You could reference it from any object in
>the same folder as the image or nested folders using dtml-var
>
>         <dtml-var foo_jpg>


Actually dots are allowed in object names. You can create a picture called 
"myPic.jpg" and insert it with <dtml-var myPic.jpg>.

However because of their special meaning in Python they make it more 
difficult to access objects in Python expressions from DTML.

Example, to access the picture title, you'd need to use :

<dtml-var "_['myPic.jpg'].title">

or (simpler but longer)

<dtml-with myPic.jpg>
    <dtml-var title>
</dtml-with>


Cheers.

Alexandre