[Zope] Problem with DTML and strings

Antonio Beamud Montero antonio.beamud@agora-2000.com
13 Mar 2002 12:26:49 +0100


Hello all:
I'm trying to construct a dynamic string to get a name of an image based
on the meta_type of a product...
Here is the code (it must clarify what I'm saying... :-)

<dtml-let nombre="_.string.join((_['meta_type'],'_img'))">
 <dtml-var nombre>
 <img src="<dtml-var "images[nombre].absolute_url()">">
<dtml-var id>

But this fails miserably... Zope says KeyError, but if a use a
expression like this:
<img src="<dtml-var "images['Disk_img'].absolute_url()">">

All works fine, and is the same string that 'nombre' contains

What I'm doing wrong...
-- 
Microsoft merges technologoies: 
Windows CE + Windows ME + Windows NT = Windows CEMENT

----
Antonio Beamud Montero
Agora Systems S.A.

http://www.agoratechnologies.com