Recent Changes - Search:

Menu

Coranto Docs

Coranto Links

PmWiki Home

Alternate Background Colors

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 colours 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 colour to be placed in your news style.

Example:

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

Edit - History - Print - Recent Changes - Search
Page last modified on January 13, 2007, at 05:41 PM