[TYPO3-english] [tt-news and TS condition ] A Custom CSS class for each news based on the first category assigned to it ?

PAM lbonnier at web-interaction.fr
Mon Sep 17 12:27:10 CEST 2012


Hi again ;-),

I would like to create a custom CSS class for each news based on the 
first category assigned to it

The idea is to use a wrap with a TS variable  :

<div class:"{$my_custom_class}"></div>

and to define it in TS constant field with something like this :

[condition : id of the first news category = 1]
my_custom_class = classCSS 1
[END]

[condition : id of the first news category = 2]
my_custom_class = classCSS 2
[END]

etc ...

Do you think it is possible?
Any idea on how to do that ?

Greetings ;-)

-- 
Laurent BONNIER (aka PAM) // Web-Interaction


More information about the TYPO3-english mailing list