2005-01-19 11:11 GMT by l0rdphi1

You can achieve alternating background colours by placing the following code in the top of your news style:

 <PerlCode> 
@OurColours = qw(#dddddd #eeeeee); # define the colours
$SwitchColour = $OurColours[($NextColour++ % @OurColours)];
</PerlCode>

Note that if you want to use more then two colors you can add more values to the OurColours array in the above code.

After adding and adjusting the above code use the variable <Field: SwitchColour> where you want the color to be placed in your news style.

Example:

 <td bgcolor="<Field: SwitchColour>">

Categories:




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