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

Robert Lemke robert at typo3.org
Thu Jul 19 11:59:17 CEST 2007


Am 19.07.2007 um 11:55 schrieb Robert Lemke:
> page = Page
> page.bodyTag = Text
> page.thing = Text
> page.10 = Text
>
> bodyTag: That's probably a property of the Page object.
> thing: That might be a property but could also be the same as "10"
> 10: That's probably a subobject because we know that numbers are  
> frequently used as indexes. Theoretically it could be a property, too.

or to make it more clear: Instead of

   page = Page
   page.bodyTag = "<body>"
   page.10 = Text
   page.10.value = "Hello"

it consequently should be:

   page = Page
   page.bodyTag = "<body>"
   page.bodyContent.10 = Text
   page.bodyContent.10.value = "Hello"

Therefore this syntax would be a shortcut to omit the "bodyContent"  
property:

   page = Page
   page.bodyTag = "<body>"
   page[10] = Text
   page[10].value = "Hello"

That principle would be universal for all ContentArrayObjects (Page  
is one, too).

robert
-- 
http://typo3.org/gimmefive




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