On Fri, Apr 21, 2000 at 10:55:50PM -0700, gpgreen@olywa.net wrote:
I am just getting started in Zope and have what is probably an obvious question. I have an external method that returns a list. I understand how to write dtml to iterate through the list using <dtml-in>. My question is how do I write a dtml-method that takes the current sequence-item and does something in it.
So in index_html
<dtml-in "my_external_method()">
<dtml-var the_other_dtml_method(sequence-item)>
The syntax you want, if I've understoof the question, is (untested): <dtml-var "the_other_dtml_method(_['sequence-item'])"> You need to do it this way because the stuff inside the quotes is a python expression and hyphens are not permitted in Python variable names. So you use the magical _ namespace, which contains things like sequence-item as a key. Cheers, Malcolm -- Malcolm Tredinnick email: malcolm@commsecure.com.au CommSecure Pty Ltd