[Zope] Variables and images
Kevin Dangoor
kid@kendermedia.com
Tue, 15 Feb 2000 12:19:54 -0500
----- Original Message -----
From: "J. Atwood" <Jatwood@bwanazulia.com>
To: <zope@zope.org>
Sent: Tuesday, February 15, 2000 11:52 AM
Subject: [Zope] Variables and images
> I get back a variable from a database "name" and want to get the image of
> the same name (or with the variable) in the "images" folder.
>
> <dtml-var "images.<dtml-var name>"> - Does not work
> <dtml-var "images." + <dtml-var name>> - Does not work
Probably the easiest would be:
<dtml-var "_.getattr(images, name)">
You could also do:
<dtml-with images>
<dtml-var "_[name]">
</dtml-with>
but I think the first looks nicer. Those are, of course, untested and come
without warranty expressed or implied :)
Kevin