hey guys I am writing an application that displays all the members of my database. Since I want to list a minimum of 15 on one page I want to highlight every second one, so they can visually be seperated. How would I do that? stephan -- Stephan Richter iXL - Software Designer and Engineer
<!--#in listofstuff--> <td <!--#if sequence-odd-->BGCOLOR="#444444"<!--#/if-->><!--#var sequence-item--></td> <!--#/in--> Should do the trick. Nick Garcia | ngarcia@codeit.com CodeIt Computing | http://codeit.com On Thu, 12 Aug 1999, Stephan Richter wrote:
hey guys I am writing an application that displays all the members of my database. Since I want to list a minimum of 15 on one page I want to highlight every second one, so they can visually be seperated.
How would I do that?
stephan -- Stephan Richter iXL - Software Designer and Engineer
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
On Thu, 12 Aug 1999, Stephan Richter wrote:
hey guys I am writing an application that displays all the members of my database. Since I want to list a minimum of 15 on one page I want to highlight every second one, so they can visually be seperated.
How would I do that?
You could use sequence-index in conjunction with if to insert the color of the row. Hence (untested): <table> # Set a variable for the processing of the page <dtml-var REQUEST.set(counter,0)> <in mysequence> # Flip it between 0 & 1 <dtml-if counter=0> <dtml-var REQUEST.set(counter,1)> <dtml-else> <dtml-var REQUEST.set(counter,0)> </dtml-if> <TR # Insert a color based on state of counter <dtml-if counter> color=0x1 <dtml-else> color=0x2 </dtml-if>
mystuff in table row </TR> </in> </table> Cheers, Anthony Pfrunder
participants (3)
-
Anthony Pfrunder -
Nick Garcia -
Stephan Richter