2005-06-15 by l0rdphi1, Parahead
Step #1: Insert this code in your news style.
<PerlCode>
@OurColours = qw(#ffffff #e8e8e8);
$SwitchColour = $OurColours[($NextColour++ % @OurColours)];
</PerlCode>
Step #2: Insert the Field <Field: SwitchColour> in your news style where you want the value to be indicated.
Note: Value1 and Value2 to be changed to values you want alternated. Add more values after those two if you need to.
Example uses:
Alternating between 2 background/forground/font colours: (Value1=#FF0000, Value2=#0000FF)
<table>
<tr>
<td bgcolor="<Field: SwitchColour>">
<h1><Field: Subject></h1>
<p><Field: Text></p>
</td>
</tr>
</table>
Alternating news item positions between left and right via layers: (Value1=left, Value2=right)
<div align="<Field: SwitchColour>">
<h1><Field: Subject></h1>
<p><Field: Text></p>
</div>
Categories: