[TYPO3-project-4-3] Variation for TypoScript "if"

Tyler Kraft tyler.kraft at netefficiency.co.uk
Thu Jun 11 16:41:26 CEST 2009



Martin Kutschker wrote:
> JoH asenau schrieb:
>>>> Could be nested as well:
>>>>
>>>> if {
>>>>     value = 1
>>>>     isLessThan = 4
>>>>     and {
>>>>         isLessThan = 2
>>>>         or {
>>>>             isInList = 1,2,3
>>>>         }
>>>>     }
>>>>    or {
>>>>         equals = 2
>>>>         and {
>>>>             isGreaterThan = 1
>>>>         }
>>>>     }
>>>> }
>>>>
>>>> What do you think?
>>> a) Who wants to make all this comparisons to a single value? "1" in
>>> your example.
>> Hey- after all it's just an example and "1" could be any value that should
>> be compared to field values, GPvar values and other parameters.
> 
> My point wasn't the example value "1". My question is: who wants to
> compare the *same* value against a multitude of other values?

Sorry Masi, I'm not trying to be argumentative, but I've often thought 
it would be handy to be able to do a compare against more than one thing.




>> if {
>>     value = 1
>>     isLessThan = 5
>>     isGreaterThan = 0
>>     isInList = 1,2,3,4
>> }
> 
> If you don't find this confusing then let's agree to disagree. To me it
> is confusing, horrible and useless.

Really, it seems pretty straight forward to me (and I don't program!) 
What's worse form your perspective I suspect, is that I think this might 
be very very useful at points.

Would it seem less confusing if it was if.value.data = GPvar:XXXX




More information about the TYPO3-project-4-3 mailing list