[TYPO3-project-4-3] Variation for TypoScript "if"
Martin Kutschker
masi-no at spam-typo3.org
Thu Jun 11 16:44:33 CEST 2009
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