[Zope] NESTED IN STATEMENTS AND PASSING VARIABLES in DTML

Theodore Patrick tpatrick@IndigoNetworks.com
Thu, 20 Jul 2000 12:27:01 -0500


What is the DTML syntax for nested in statements. Here is an example.

________________________________________
EXAMPLE 1: NO VARIABLE PASSING

GOAL: loop 4 times and with each loop run the category_method and print out
the results:

<dtml-in "1,2,3,4">
    <dtml-in "category_method(id='1')" size=100 start=query_start>
id=<dtml-var id>&seq=<dtml-var seq>&vid=<dtml-var vid>
    </dtml-in>
</dtml-in>

WORKS!

________________________________________
EXAMPLE 2: VARIABLE PASSING

GOAL: Loop in the active_category_method and for each row run the
category_method passing a new 'id' variable and print out the results.

<dtml-in "active_category_method()">
    <dtml-in "category_method()" size=100 start=query_start>
id=<dtml-var id>&seq=<dtml-var seq>&vid=<dtml-var vid>
    </dtml-in>
</dtml-in>

ERROR --> ID is not being passed to "category_method()"
________________________________________

Anyone have a solution out there?

NOTE: active_category_method and category_method are SQL METHODS. Where 'id'
is and SQL_VAR for category_method.

Thanks in advance!

Theodore E. Patrick
Ishophere.com