[Zope] call DTMLMethod with parameter from Python
Robert Rottermann
robert@redcor.ch
Tue, 26 Mar 2002 06:59:44 +0100
I can only give you a hint.
In ZPT _ is here. Therefore you could try :
<span tal:replace="structure python:here.myDTMLMethod( None, here,
optionalkey1='yada' )"> ...
Robert
----- Original Message -----
From: "Damon Eckhoff" <eckhoffd@missouri.edu>
To: <zope@zope.org>
Sent: Monday, March 25, 2002 11:20 PM
Subject: [Zope] call DTMLMethod with parameter from Python
> Hello:
>
> I'm working in a skin within CMF 1.2 and Zope 2.5.0...
>
> I'm trying to clarify how to call a DTML Method with
> parameters from a python script. The docs I've read
> say to call it something like this:
>
> result_string = context.myDTMLMethod( None, _, optionalkey1='yada' )
>
> But the python script I have is being called
> from a Page Template as a result of a form action. I
> don't understand how to change this to work without the _ or how to
> pass a REQUEST mapping to the DTMLMethod.
>
> Currently, when I make the call:
>
> result_string = context.formatResult()
>
> result_string actually contains the dtml code of formatResult
(un-rendered)
> . What causes this? Lack of parameters?
>
> What am I missing here?
>
>
> Kind Regards,
>
> Damon.
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>