[Zope] Passing parameters into DTML methods
Phillip J. Eby
pje@telecommunity.com
Mon, 28 Jun 1999 20:05:34 -0500
Try:
<!--#call "updateValue(_.None,_,newval=100)"-->
The problem is that when you call a DocumentTemplate without parameters,
the system sees it's a DocumentTemplate and passes through the current
namespace. If you call it with parameters, the system in effect assumes
you know what you're doing and doesn't mess with the parameters you're
passing. Normally, DocumentTemplates take two positional arguments before
the keyword arguments - specifically, a 'client' and a 'namespace'. '_' is
the current DTML namespace, that's why it's passed in second. _.None as
the first parameter skips over the 'client' parameter, which isn't needed.
At 07:47 PM 6/28/99 -0500, Albert Boulanger wrote:
>I have the following dtml code piece (using Zope 1.10.2):
>
>
><!--#call "updateValue(newval=100)"-->
>
>updateValue is a dtml method which looks like:
>
>
><!--#if "hasProperty('lastValue')"-->
><!--#call "manage_changeProperties(lastValue=newval)"-->
><!--#else-->
><!--#call
>"manage_addProperty('lastValue',newval,getPropertyType('default'))"-->
><!--#/if-->
>
>When I view the dtml method, foo, with the call <!--#call
>"updateValue(newval=100)"-->
>I get the error below . Interestingly, if I change the method above to: