[Typo3-dev] Setting a value for a condition via TS

Peter Russ peter.russ at 4dfx.de
Fri Feb 25 17:25:24 CET 2005


JoH schrieb:

> Hi.
> 
> Could have asked the english main list but I guess this is the better list
> for my question:
> 
> Getting a value from a field via TS is no problem:
> 
> temp.whatever = TEXT
> temp.whatever.field = myfield
> 
> or maybe
> 
> temp.whatever = LOAD_REGISTER
> temp.whatever {
> myparameter.field = myfield
> }
> 
> But how do I use this value in a condition?
> The problem is, that I have to set a value for a property that hasn't got
> stdWrap properties depending on a value taken from a field.
> 
> If (field = 1) {
>     property = this is parameter 1
> }
> 
> If (field = 2) {
>     property = this is parameter 2
> }
> 
> 
> http://typo3api.ueckermann.de/class_8tslib__content_8php-source.html#l01426
> says that LOAD_REGISTER puts an array into $GLOBALS['TSFE'] but the
> following did not work:
> 
> [globalVar = TSFE:register|myparameter = 1]
> do something
> [globalVar = TSFE:register|myparameter = 2]
> do seomthing else
> [global]
> 
> Is it possible at all, and if so, how?
> 
> TIA
> 
> Joey
> 
> 
Check for "if" TS-Ref. p.31.
Should make what you want.
Regs. Peter




More information about the TYPO3-dev mailing list