[TYPO3-ttnews] Alternating background colors with tt_news

Alexandre Bourget alexandre.bourget at savoirfairelinux.com
Fri Oct 19 16:07:30 CEST 2007


Hola,

Rhe method I've seen with ###NEWS### and ###NEWS_1,2,3### is good for
more complex solutions. But I found that duplicating the code only for
toggling a class name wasn't going to make things easier to maintain,
especially if I have a bunch of templates to maintain.

The patch just adds a marker that switches from 0 to 1, easily add the
possibilty to create two-row background-color toggling, without
duplicating code.

Have I missed something else in the tt_news plugin ?


Le vendredi 19 octobre 2007 à 15:52 +0200, Francois Suter a écrit :
> Hi,
> 
> > I'm new to all those Typo3 extensions, but I've patched tt_news to allow
> > for background toggling very easily:
> > 
> > Here it is attached.
> > 
> > Feedbacks are welcome. Maybe you can point me to some best-practice
> > where I've failed.
> 
> Maybe it's not as easy as you would like, but there's already such a 
> feature in tt_news. You can have alternate templates for news items, 
> which allows you to use different classes and hence difference 
> backgrounds (for example).
> 
> Look at the template file provided with the extension 
> EXT:tt_news/pi/news_template.tmpl and corresponding part of the manual.
> 
> Have I misunderstood your point?
> 
> Cheers
> 
-- 
Alexandre Bourget
Consultant en Logiciel Libre
Savoir-faire Linux Inc.
alexandre.bourget at savoirfairelinux.com
514-276-5468 poste 124



More information about the TYPO3-project-tt-news mailing list