[TYPO3-50-general] TypoScript syntax: Array indexes

Martin Ficzel martin.ficzel at gmx.de
Thu Jul 19 18:10:58 CEST 2007


Robert Lemke schrieb:
> or with the new syntax, which still doesn't make me really happy:
> 
> obj1 = Array
> obj1."obj2" = Array
> obj1."obj2"."obj3" = Text

well what i see is that the major problem is the use of strings as array
indexes. if that is dropped the ts parser could handle every numeric key
as an array index and all alphanumeric keys as properties.

the only problems are objects like case wich are currently working that way

10 = CASE
10.key = foo
10.foo = TEXT
10.foo.value = bar


thats a real crappy syntax and it could be solved like this

10 = CASE
10.key = foo
10.items.10 {
  key = bar
  content = TEXT
  content.value = bar
}

that syntax needs 1 extra line of ts but afterwards the string index is
gone and the parser knows that all items habe to be of type ITEM so he
can check their properties aswell.

i think the other string indices in current ts can also be avoided like
this.

regards Martin


More information about the TYPO3-project-5_0-general mailing list