Forums / Setup & design / Alternating row colors in OE table

Alternating row colors in OE table

Author Message

Andrew Kelly

Wednesday 18 November 2009 5:59:13 am

Hi everybody,

have any of you run across a way to make tables which are created through the OE change colors in alternating rows? It seems such a common practice visually, but I'm not seeing any obvious solutions.

Any pointers are very much appreciated, thank you.

Andy

Radek Kuchta

Wednesday 18 November 2009 8:55:53 am

Hi Andrew,

You can easly use content.ini.append.php file to define your CSS classes for table row:

[tr]
AvailableClasses[]
AvailableClasses[]=trBlack
AvailableClasses[]=trWhite

and then just use it in OE.

Hope it helps you :)

http://ez.no/certification/verify/272582

Andrew Kelly

Monday 30 November 2009 5:24:27 am

Hi Radek,

thanks for the pointer, much appreciated. Unfortunately, it's not quite what I was after. In fact, the suggestion you've made is how I've been doing things anyway for some time now. It's just that that particular method is not at all productive. For example, a table with dozens or even hundreds of rows is tiresome to build this way, having to select a class for each row. And if later you need to delete or move rows, it's very likely that you have to re-assign classes for dozens and dozens of rows again. Very inefficient.

I was hoping somebody had created an extension to plug into the OE that would automatically assign classes to alternate rows, so no matter how things might be sorted, a light/dark osscilation would always be present.

Andy