[Zope] call zpt methods in dtml

nagendra prasad t_nagendraprasad@yahoo.co.in
Thu, 19 Jun 2003 07:04:04 +0100 (BST)

thanks for the response.
this is what i have done earlier.
this is my macros in zpt (name is myZPtemplate).here
this form action points to dtml script.
<tr tal:define="startdate request/startdate|nothing">
  <th align="left">
    <font size=5><font face="verdana"><b>
    Start Date:
  <td><input type="text" name="startdate"
python:form.startdate.render(startdate)" />

this is my dtml script(talks to openflow) that tries
to call zpt
<dtml-var standard_html_header>
<h2><dtml-var document_title></h2>
<dtml-let instance="workflow.addInstance('request',
  'no comment',
  'Request for Grant by ' + 

**<dtml-call "instobj.manage_addProperty('startdate',
startdate, 'string')">**

<dtml-call "workflow.startInstance(instance)">
<a hre f="index_html">To frontpage</a>
<dtml-var standard_html_footer>
Now the line that is marked with * is replaced by 
<dtml-var expr="myZPtemplate(startdate)">
Now when i run the zpt file & click submit(reaches the
dtml file correctly) but still 
Error Type
Error Value
name 'startdate' is not defined
it always gives an error that occured earlier
i have read this doc on 
but doesn;t talk anything abt these
plz tell me what to do
what is the problem

>  > how do i call zpt in dtml?
> Options:
>   <dtml-var myZPT>
>   <dtml-var expr="myZPT(a,b,c)">
> The first form calls "myZPT" without parameters,
> the second with "a,b,c". In "myZPT" you can access
> arguments via
> the "options" variable (a dictionary). "args" is the
> tuple of
> positional arguments, all other keys specify keyword
> arguments.
> Read more in the Zope Book (2.6 edition).
> Dieter
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev ) 

Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/