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

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


No offence, but this looks confusing to me! And from what I can tell it 
also relies upon the user having programming knowledge, which not all of 
us have.


Martin Kutschker wrote:
> Ernesto Baschny [cron IT] schrieb:
>> Hi,
>>
>> maybe some more usual way of expressing a condition would fit better the
>> understanding?
>>
>> if = $a > $b
>> if.a =
>> if.b =
>>
>> if = ( $a AND $b ) OR ( $c and $d )
>> if.a =
>> if.b =
>> if.c =
>> if.d =
>>
>> And also having some basic functions:
>>
>> if = CONTAINS($a, "xyz")
>> if.a = ...
>>
>> etc. Even if it doesn't look too TypoScript'ish, it might look more
>> intuitive for people trying to figure it out.
> 
> Other idea:
> 
> if = {a} > {b} || {c}
> if.a = value:42
> if.b = object:TEXT
> if.b.value = 123
> if.c = function:inList
> if.c.needle = l
> if.c.haystack = w,o,r,d
> 
> Note that the expression allows also all replacement a dataWrap offers.
> 
> Masi
> 
> PS:
> 
> A new TS-Object FUNCTION would take away the need for "funcion:<name>".
> 
> foobar = FUNCTION
> foobar.name = <function_name>
> foobar.arguments = <array>
> 
> PPS: If we assumed that any value starting with quotes (single or
> double) and perhaps the pipe (and ending with the same letter) is a
> literal and not an object we could simpify the syntax even more.
> 
> if = {a} > {b} || {c}
> if.a = "42"
> if.b = TEXT
> if.b.value = 123
> if.c = FUNCTIOn
> if.c.name = inList
> if.c.arguments.needle = l
> if.c.arguments.haystack = w,o,r,d


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