[TYPO3-project-realty] 2 list view template questions

horace horace3d at gmail.com
Mon Oct 12 14:07:31 CEST 2009


>
> > > i would like to use alternating background colors for the listed items.
> > but
> > > the marker ###CLASS_POSITION_IN_LIST### only results in the class
> "first"
> > > for the first item. the further items get no class at all. how could i
> > > achieve alternating background colors then?
> >
> > This is a "missing feature". If you'd like to sponsor it (or provide a
> > high-quality patch), please let me know. :-)
> >
>
>
> i will try to find this part in the code and fix it. not sure though if it
> will be a high quality patch since i am not really a php programmer. :)
> usually i only use python.
>



ok, here is my high quality patch:

class.tx_realty_pi1.php

replace line 791:
$position = ($rowCounter == 0) ? 'first' : '';
with:
$position = ($rowCounter % 2) ? 'odd' : 'even';

was easier than i thought. :p


More information about the TYPO3-project-realty mailing list