[Zope] evaluating a "sequence-item" within a dtml-if statement

John Ziniti jziniti at speakeasy.org
Mon Sep 15 12:29:24 EDT 2003


>    <dtml-in expr="[1,2,3,4,5,6]">
>       <dtml-if expr="&dtml-sequence-item;==3">
>          &dtml-sequence-item;
>       <dtml-else>
>            failed
>       </dtml-if>
>    </dtml-in> 


You need to retrieve the "sequence-item" from the
special "_" namespace:

<dtml-in "[1,2,3,4,5,6]">
    <dtml-if "_['sequence-item']==3">
        <dtml-var sequence-item>
    </dtml-if>
</dtml-in>




More information about the Zope mailing list