[htmltmpl] Re: How to Put reference array in to structure fro use in H::T?
Brought to you by:
samtregar
From: Mark S. <ma...@su...> - 2004-09-29 12:51:59
|
On 2004-09-28, Dale W. Hanzelka <dal...@in...> wrote: > What I am faced with is the SELECT constraints need to be dynamic and > the list could be up to 20 fields. When I output the rows, I need each > to split each column into a separate cell in a table. Why don't you try to solve this with HTML::Template, and post your code here if it doesn't work? Your case is not so simple that there simple answer to hand to you. Here's a hint to get started: > # set color to (odd)white || (even)lt grey > $color = (&odd_or_even($count) == 0) ? "#DDDDDD" : "#FFFFFF"; I'm curious what "odd_or_even()" might do. It sounds like the same thing as using the built-in "modulo" operator: ($count % 2 == 0) Besides, this can be solved in the template with the the __ODD__ functionality of HTML::Template. Mark -- http://mark.stosberg.com/ |