[Zope] Equivalent Statement

kittonian kittonian at macgenius.net
Sat Jan 3 15:47:01 EST 2004


I can't seem to figure out what the equivalent code would be to use in a
ZPT.  Can someone provide me the answer?
 
I have the following statement working in my dtml-documents:
 
<dtml-in expr="methods.dropdown( listname='state' )" >
<option value="<dtml-var item_value>"><dtml-var item_name></option>
</dtml-in>
 
Here is an explanation of what the code does. The end result is that the
contents of select lists are based off of data from the database.
 
<dtml-in expr="methods.dropdown( listname='state' )" > # this line calls to
the dropdown zsql method in the methods folder and tells it that the
variable listname should equal state
 
<option value="<dtml-var item_value>"><dtml-var item_name></option> # this
line just puts in the two variables that the zsql method has returned and
puts in item_value and item_name (two columns in the db table) into the
correct place
 
</dtml-in> # this is just the closing tag
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20040103/b55c148e/attachment.html


More information about the Zope mailing list