[TYPO3-ttnews] Alternating background colors with tt_news

Sascha Egerer seg at softvision.de
Fri Oct 19 16:27:55 CEST 2007


Alexandre Bourget schrieb:
> 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
>>

but what is if somebody needs a marker wich switches from 0 to 1 to 2?
If you do something like this you should do it more flexible... maybe a 
typoscript value wich defines the maximal number...


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