You can't use DTML tags inside an expr="" attribute; the value of expr
is python code.

To access the sequence-item variable from python, you need:

So, try something like this (untested):

<dtml-in expr="REQUEST.form.items()">
<dtml-in expr="testSQL(text=_['sequence-key'] + 'x' +
<dtml-var result>


-----Original Message-----
From: Lee [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 14, 2001 1:23 PM
Subject: [Zope] renaming python input params in DTML


I am having a problem passing in a variable to a Python method, which is
obtained from the REQUEST object - I'd really appreciate someone's
insight into how to correctly go about this.

I have a form that submits a parameter named '9728430xp0xclasstest' with
a value = 7 to a DTML method.

I have a Python method expecting 'text' as a parameter so I want the
DTML method to send 'text' onto this with a value = the value of the
original parameter appended to name (i.e. 9728430xp0xclasstestx7).

So text=9728430xp0xclasstestx7

Does that make sense?

The Python method, testSQL, returns 'result'. As I recently found out, I
have to make to make use of the REQUEST object to obtain these

The following snippet produces the correct value

<dtml-in expr="REQUEST.form.items()"><dtml-var sequence-key>x<dtml-var

... but how can I can pass this as 'text' to my Python method?

Am I on the right track with the following:

<dtml-in expr="REQUEST.form.items()">
<dtml-in expr="testSQL(text='<dtml-var sequence-key>x<dtml-var
<dtml-var result>

Thank very much for any help you can offer.

- Best regards,


<dtml-let text="'9728430xp0xclasstestx7'">
<dtml-var text>
</dtml-let> ... may help


<dtml-var standard_html_header>
<dtml-in expr="REQUEST.form.items()">
   <dtml-let text="'<dtml-var sequence-key>x<dtml-var sequence-item>'">
  <dtml-var text>
</dtml-in> ... gives me text = x !

Any help would really be appreciated?

Thanks :)

Lee Reilly



I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @

</shameless plug>

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to