TypoScript Syntax

1.2. Syntax

1.2.1. Introduction

Remember, TypoScript is like a (large) multidimensional PHP array; values arranged in a hierarchy - a tree. The "branches" are indicated with periods (".") - a syntax borrowed from for example JavaScript and which conveys the idea of defining objects/properties. For more details on these metaphors you should read the introductory chapters of this document. Here we will only deal with the syntactically rules.

Example:
  myObject = [value 1]
  myObject.myProperty = [value 2]
  myObject.myProperty.firstProperty = [value 3]
  myObject.myProperty.secondProperty = [value 4]

 

Refering to "myObject" we might call it an "object with the value [value 1] and the property, 'myProperty' with the value [value 2]. Furthermore 'myPropery' has its own two properties, 'firstProperty' and 'secondProperty' with a value each ([value 3] and [value 4])."

We might even call 'myProperty' for a TypoScript object in this example! This is already explained in the introduction chapter.

Remember, TypoScript contains information and is not "executed" like a real scripting language is; therefore it doesn't report any errors if you specify non-existing objects or non-existing properties. Such an evaluation only makes sense when TypoScript is used in a context (like "TypoScript Templates" or "Page TSconfig"). However we can always evaluate TypoScript for a correct syntax (which means whether information is defined in a correct way, following the "grammatical" rules).

Anyways, the TypoScript above looks like this in a node-tree (the TypoScript Object Browser creates such):

 


To top


Valid XHTML 1.0!