[Zope] using "sequence-even" in nested "dtml-in" loops?

Mike Doanh Tran mtran at shufflemasterrd.com
Thu Aug 7 17:21:15 EDT 2003


You almost got it.  Try this:

 <dtml-if sequence-even>
    <tr bgcolor="white">
      <dtml-else>
   <tr bgcolor="gray">
 </dtml-if>


MT


----- Original Message -----
From: "Mike Doanh Tran" <mtran at shufflemasterrd.com>
To: <mtran at shufflemaster.com>
Sent: Thursday, August 07, 2003 4:14 PM
Subject: Fwd: [Zope] using "sequence-even" in nested "dtml-in" loops?


>
>
> ----------  Forwarded Message  ----------
>
> Subject: [Zope] using "sequence-even" in nested "dtml-in" loops?
> Date: Thu, 7 Aug 2003 13:37:27 -0700
> From: "Sajec, Mike TQO" <msajec at tqs.com>
> To: zope at zope.org
>
> Hello,
>
> If someone can help with this, I would really appreciate it.
>
> I'm trying to setup alternating colors in a query built table.  I'm
> attempting to key off the sequence-even variable to set the row colors.
The
> problem that I'm seeing is that sequence-index always equals zero, which
> makes sequence-even always true, and every row grey.  It appears that
> sequence-index is looking at the outer loop.  Any hints?
>
> Thanks in advance,
> Mike
>
>
> <p>
> <table class="listing" id="contact_list">
> <thead>
> <th>Name</th>
> <th>Position</th>
> <th>Phone</th>
> <th>Pager</th>
> <th>Cell</th>
> <th>Email</th>
> </thead>
> <tbody>
> <dtml-in sql_get_pe_ids>
>    <dtml-in sql_get_pe_contact_info>
>       <dtml-if sequence-even> #*******************HERE
>          <tr bgcolor="gray">     #*******************HERE
>       <dtml-else>                   #*******************HERE
>          <tr>                           #*******************HERE
>       </dtml-if>                       #*******************HERE
>          <td><dtml-var last_name>, <dtml-var first_name></td>
>          <td><dtml-var job_title></td>
>          <td><dtml-var ext></td>
>          <td><dtml-var pager></td>
>          <td><dtml-var cellphone></td>
>          <td><dtml-var email></td>
>          </tr>
>    </dtml-in>
> </dtml-in>
> </tbody>
> </table>
> </p>
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
> -------------------------------------------------------




More information about the Zope mailing list