note
hawtin
<h2>TIMTOWTDI**2</h2>
<p>
Personally I don't like setting format in the HTML, I find it easier to manage in the stylesheet.</p>
<code>
In site.css:
.row_2
{
background-color: #f4f4f4;
}
.row_1
{
background-color: #ffffff;
}
In generate.pl:
...
print "\@import url(/site.css);\n";
my $num_rowtypes = 2;
...
my $count = 0;
for(my $i=0;$i<=$#{$items_list};$i++)
{
print "<tr class=\"row_${count}\">".
"<td class=\"pos\">".($i+1)."</td>\n";
foreach my $col ("art","tit","yer","cht")
{
my $val = link_to($cat,$page,$col,$nam);
print "<td class=\"$col\">".$val."</td>\n";
}
print "</tr>\n";
$count++;
$count = 0 if($count == $num_rowtypes);
}
</code>
637375
637375