-
Book Overview & Buying
-
Table Of Contents
Mastering TypoScript: TYPO3 Website, Template, and Extension Development
The following example will help you understand what objects are and how they are handled. You have several options for going to work every morning. You can travel by bus, train, car, or bicycle. All of these means of transport can be represented in TypoScript by the variable myVehicle. The actual means of transport can now be assigned to this variable as an object. Typical object types in this case would be TRAIN, CAR, or BICYCLE. We will focus on the third and most ecologically valuable of these options:
myVehicle = BICYCLE
This syntax declares that myVehicle is an object of type BICYCLE. Of course every BICYCLE has properties, such as the size and the number of gears, even if it is only one gear in the simplest case. A BICYCLE object could therefore be described as follows:
myVehicle = BICYCLE myVehicle.size = 28 myVehicle.gears = 3
These lines of code tell TYPO3 about the BICYCLE object—its size is 28 inches and it has three gears. The operator = (equality sign...
Change the font size
Change margin width
Change background colour