[Zope] Setting the correct bgcolor it TR tag
Paul Zwarts
paz@oratrix.com
Thu, 12 Jul 2001 14:53:43 +0200
Perhaps you are expecting sequence-index to start at 1 instead of 0?
ALthough, it would make more sense that since you state sequence-odd twice,
it should always evaluate the first one and always ignore the second.
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Schmidt, Allen J.
Sent: Thursday, July 12, 2001 2:37 PM
To: zope@zope.org
Subject: RE: [Zope] Setting the correct bgcolor it TR tag
I ran across an odd thing on this topic last night...
table
dtml-in ZSQL_method
tr if sequence-odd bgcolor=silver
td td td
/tr
tr if sequence-odd bgcolor=silver
td colspan=3
/tr
/dtml-in
/table
The first pass for two rows are colored correctly. Then in the second pass,
the first row is correct and the second is not. Then from there on, 3 rows
are alternatly correct - not 2! Sort of hard to explain...
Does sequence-odd get 'triggered' or something when accessed? Or does the
fact of another table row within the same data-row-block have something to
do with it?
Thanks
Allen
-----Original Message-----
From: Ausum [mailto:augusto@artlover.com]
Sent: Thursday, July 12, 2001 8:20 AM
To: Gitte Wange; zope@zope.org
Subject: Re: [Zope] Setting the correct bgcolor it TR tag
Untested:
<dtml-in "objectValues('Media Manager Show')" sort="getId" size="19"
start=qs skip_unauthorized>
<dtml-if sequence-odd>
<TR class="MastHead">
<dtml-else>
<TR BGCOLOR="#FFFFFF">
</dtml-if>
</dtml-in>
Ausum
Gitte Wange wrote:
>
> Hello,
>
> I am generating a list of objects with different BG color in the TR tag.
The
> code I have now looks like this:
> <dtml-if sequence-odd>
> <TR class="MastHead">
> <dtml-else>
> <TR BGCOLOR="#FFFFFF">
> </dtml-if>
>
> Usually this works in a <dtml-in> sequence but ...
>
> We will one list objects that has metatype=Media Manager Show so therefor
the
> code looks like this:
> <dtml-in "objectValues()" sort="getId" size="19" start=qs
skip_unauthorized>
> <dtml-if expr="meta_type == 'Media Manager Show'">
> <dtml-if sequence-odd>
> <TR class="MastHead">
> <dtml-else>
> <TR BGCOLOR="#FFFFFF">
> </dtml-if>
>
> Since it only some of the object values that are used I cannot be sure
that
> the bg color of the row-items is set corectly (right now they are all
blue).
> Therefor I thought if I could move the type-check into the <dtml-in>
request.
>
> Anywho knows how to do this ??
>
> Regards,
> --
> Gitte Wange Jensen
>
> Sys Admin, Developer and a lot more
> MMmanager.org Aps, Denmark
>
> Phone: +45 29 72 79 72
> Email: gitte@mmmanager.org
> Web: www.mmmanager.org
>
> Quote of the day:
> Livet er svært, men frygt ej -
> matematik er sværere.
>
> - Storm P.
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )