[Zope] Setting the correct bgcolor it TR tag

Schmidt, Allen J. aschmidt@nv.cc.va.us
Thu, 12 Jul 2001 08:36:34 -0400


I ran across an odd thing on this topic last night...

table
dtml-in ZSQL_method
 tr if sequence-odd bgcolor=3Dsilver
  td td td
 /tr
 tr if sequence-odd bgcolor=3Dsilver
  td colspan=3D3
 /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
=20

-----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=3D"getId" =
size=3D"19"
start=3Dqs skip_unauthorized>

   <dtml-if sequence-odd>
     <TR class=3D"MastHead">
   <dtml-else>
     <TR BGCOLOR=3D"#FFFFFF">
  </dtml-if>

</dtml-in>



Ausum


Gitte Wange wrote:
>=20
> Hello,
>=20
> 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=3D"MastHead">
> <dtml-else>
>  <TR BGCOLOR=3D"#FFFFFF">
> </dtml-if>
>=20
> Usually this works in a <dtml-in> sequence but ...
>=20
> We will one list objects that has metatype=3DMedia Manager Show so =
therefor
the
> code looks like this:
> <dtml-in "objectValues()" sort=3D"getId" size=3D"19" start=3Dqs
skip_unauthorized>
>  <dtml-if expr=3D"meta_type =3D=3D 'Media Manager Show'">
> <dtml-if sequence-odd>
>  <TR class=3D"MastHead">
> <dtml-else>
>  <TR BGCOLOR=3D"#FFFFFF">
> </dtml-if>
>=20
> 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.
>=20
> Anywho knows how to do this ??
>=20
> Regards,
> --
> Gitte Wange Jensen
>=20
> Sys Admin, Developer and a lot more
> MMmanager.org Aps, Denmark
>=20
> Phone: +45 29 72 79 72
> Email: gitte@mmmanager.org
> Web: www.mmmanager.org
>=20
> Quote of the day:
> Livet er sv=E6rt, men frygt ej -
> matematik er sv=E6rere.
>=20
>         - Storm P.
>=20
> _______________________________________________
> 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 -=20
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )