[Zope] seq-items and nested dtml-ins

Aaron Payne aaron@aaronpayne.com
Wed, 24 May 2000 13:17:22 -0400


How do you differentiate between the seq-items of nested dtml-ins?

I tried the following code:

<dtml-in "instances.objectValues(['Coupon ZClass'])">

<dtml-in SearchCategory>
   <dtml-if "_['sequence-item']=='Auto' ">
    <dtml-call "resultsList.append(_['sequence-item'])">
   </dtml-if>
</dtml-in end SearchCategory>

</dtml-in end instances>

Where:
instances is a folder containing the coupon instances
Coupon ZClass is the meta type of the zclass
SearchCategory is a list from a form
resultsList is a list containing instances of Coupon ZClass matching the 
search criteria
Auto is a property of Coupon ZClass

When I try to run a search an error page pops up saying "strings aren't 
allowed as input in the in tag."

The property Category of the zclass is the type lines.  "Auto' is one of 
the values in Category.
In <dtml-if "_['sequence-item']=='Auto' "> I am comparing the current 
element of SearchCategory to one of the values in Category.

In <dtml-call resultsList...> I want to append the instance and not 
SearchCategory list.



				
Peacefully,
Aaron