[TYPO3-english] custom TS conditions

Victor Livakovsky v-tyok at mail.ru
Fri Nov 25 14:17:38 CET 2011


Hi, Tomasz.

>  From TS syntax in-depth study I know that I can parse my TS and add
> custom conditions like [TYPO3 IS GREAT]. The problem is that I don't
> know how to tell TYPO3 about my class. Such conditions looks more
> interesting to me than userFunc.
>
> Can you help me?

As far, as I understood this may be used in your custom TS area - not in 
global TS templates. F.e. you have some textarea in flexform of your 
extension, where you allow editors to put raw TS. So, you can access this 
field from your PHP code and invoke t3lib_tsparser with your conditions 
checker object. You can find a real-life example in tt_news extension - 
there is an area on last tab of FF, where you can put TS code (but tt_news 
doesn't have some special conditions defined fot this purpose).

So, conclusion: custom conditions may be used only in your own extensions, 
userFunc should be used in normal TS.
Correct me somebody, if I'm wrong, 



More information about the TYPO3-english mailing list