don't forget the leading "-" on the first line
you'll want this:
-for record in @records
%tr{:class => cycle('alt', '')}
you could also cycle between a string and nil like this:
-for record in @records
%tr{:class => cycle('alt', nil)}
On Feb 7, 10:45 am, Chris Abad <[EMAIL PROTECTED]> wrote:
> for record in @records
> %tr{:class => cycle('alt', '')}
>
> On Feb 7, 2007, at 10:35 AM, Larry Kelly wrote:
>
> > Can you give an example of how to code alternating row styles in haml?
>
> > Something like :
> > for row in @records do
> > if row.count.even
> > %tr.even
> > else
>
> > --
> > Best Regards,
> > -Larry
> > "Work, work, work...there is no satisfactory alternative."
> > --- E.Taft Benson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---