[Zope] Variable Passing Question?

Jason Burke jason.burke@altertrading.com
04 Sep 2002 12:22:36 -0500


Greetings All,

I feel pretty dense asking this question, but I can't seem to
find the answer anywhere.

How do I pass a namespace variable to a python script from a
DTML document. The zope book says to do this...

<dtml-call expr="updateInfo(color='brown', pattern='spotted')">

But these values are hardcoded, and that's no good cause I
need to pass a variable. I've tried a bunch of different ways
but nothing seems to work (I either get a syntax error or a
type error). I had thought that just substituting <dtml-var color>
for 'brown' in the above example might work, but it doesn't. I
then tried to quote the dtml-var tag (that just produced a type 
error), and then tried to reference the REQUEST object (like
this color=REQUEST.color) and again it produced a type error.
I've tried the following things...

color=<dtml-var color>
color='<dtml-var color>'
color=REQUEST.color
color=&dtml-color
color=_['color'] 
color=color

None of these work, and I can't seem to find any docs on how
to make it work (I'm assuming that it does work somehow still
at this point). 

Can anyone out there give me the correct syntax, or reference
to the correct syntax? I'd be eternally grateful to anyone
who can set me straight on this.

Sincerely,

Jason