[Petal] table rows using alternating style info?

Chris Croome chris at webarchitects.co.uk
Sat Dec 11 17:45:58 GMT 2004


On Sat 11-Dec-2004 at 12:32:54AM +0000, Terrence Brannon wrote:
> I did not see an example of how to make alternating table rows using
> different style information (usually the variation is background
> color).
> Could someone show how that is done in Petal.

I set this up the other day for some tables in MKDoc 1.8 (we must
set up viewcvs or something...), this is a extract from the
audience_list template, it's basically a matter of repeating the
row, this has the advantage that when you view the file in a browser
or WYSIWYG editor you get to see two different rows, one thing that
I don't know how to avoid is the ugly div that has to be omitted:

      petal:repeat="audience self/audiences"
      <!--? The odd row comes before the even row ?-->
        petal:condition="true: repeat/odd"
          <!-- stuff here -->
      <!--? The even row comes after the odd row ?-->
        petal:condition="true: repeat/even"
          <!-- stuff here -->

This example should be added to Petal POD -- there isn't an example
like this documented anywhere.


Chris Croome                               <chris at webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   

More information about the Petal mailing list