How to Pass values to a DTML method ??
I have a DTML method that is called from a document. I need to pass a value to it like a parameter would be passed to a function. <dtml-var some_method(param=value)> Thanks
<dtml-var "some_method(param='Test')"> 'Test' is single quoted if it is a string, if it is a variable then don't quote it. Notice also the double quotes "some_method(param='Test')" Dan Stuart Foster wrote:
I have a DTML method that is called from a document. I need to pass a value to it like a parameter would be passed to a function.
<dtml-var some_method(param=value)>
Thanks
_______________________________________________ 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 )
I have a DTML method that is called from a document. I need to pass a value to it like a parameter would be passed to a function.
<dtml-var some_method(param=value)>
try something like: <dtml-var "method_name(_.None, _, param=value)"> or: <dtml-var "method_name(_.None, _, arg1=value1, arg2=value2)"> for a longer expose see the faq: http://zdp.zope.org/projects/zfaq/faq/DTML/955111628 hth Rik
enclose the expression in quotes and you're happy: <dtml-var "some_method(param=value)"> phil *********** REPLY SEPARATOR *********** On 11.09.2000 at 09:01 Stuart Foster wrote:
I have a DTML method that is called from a document. I need to pass a value to it like a parameter would be passed to a function.
<dtml-var some_method(param=value)>
Thanks
_______________________________________________ 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 )
participants (4)
-
Daniel Rusch -
Philipp Auersperg -
Rik Hoekstra -
Stuart Foster