[Zope] weird alternate colored table rows

Roel Van den Bergh roel@planetinterior.com
Wed, 12 Jun 2002 14:00:03 +0200


I have the following code for alternate colored table rows.
I do not want the Members folder to show in the list.
When the exception is met 'alternate colored rows' skips a line
I tried to alter sequence-index without succes.
Suggestions?

Viewing this without 'Members' folder present it renders like:

Folders (hilite)
0
1       (hilite)
2

If there is a 'Members' folder present it renders like:

2
Folders (hilite)
0
2

Code:

<dtml-in expr="objectValues( [ 'Folder', 'Portal Folder' ] )"
         sort="title_or_id">
<dtml-if sequence-start>
<table>
 <tr class="row-hilite">
  <td>Folders</td>
 </tr>
</dtml-if>
 <dtml-if expr="id <> 'Members'">
<dtml-if sequence-odd>
 <tr class="row-hilite">
<dtml-else>
 <tr class="row-normal">
</dtml-if>
  <td>
   <dtml-var sequence-index>
  </td>
 </tr>
 <dtml-else>
  <dtml-let index=sequence-index
            index="index+1"
            sequence-index=index>
   <dtml-var sequence-index>
  </dtml-let>
 </dtml-if>
<dtml-if sequence-end>
</table>
</dtml-if>
</dtml-in>

TIA, Roel.