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
On Sat, Jan 03, 2004 at 03:47:01PM -0500, kittonian wrote:
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>
untested... <option tal:repeat="result python:methods.dropdown(listname='state')" tal:attributes="value result/item_value" tal:content="result/item_name"> </option> -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's THE ACTIVE FINALE! (random hero from isometric.spaceninja.com)
participants (2)
-
kittonian -
Paul Winkler