2005-06-15 by l0rdphi1, Parahead

Step #1: Insert this code in your news style.

@OurColours = qw(#ffffff #e8e8e8);
$SwitchColour = $OurColours[($NextColour++ % @OurColours)];

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)

<td bgcolor="<Field: SwitchColour>">
<h1><Field: Subject></h1>
<p><Field: Text></p>

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>


Page last modified on February 02, 2009, at 06:57 PM