Book Image

Mastering TypoScript: TYPO3 Website, Template, and Extension Development

Book Image

Mastering TypoScript: TYPO3 Website, Template, and Extension Development

Overview of this book

Free, open-source, flexible, and scalable, TYPO3 is one of the most powerful PHP content management systems. It is well suited for creating intranets and extranets for the enterprise. While providing an easy-to-use web interface for non-technical authors and editors of content, its messaging and workflow system enable shared authoring and collaboration. TYPO3 provides flexible and powerful interfaces for both content editors and administrators, giving them full control of the core aspects the system. However for developers who need to customize the system, TYPO3 offers a powerful configuration language called TypoScript. Good knowledge of TypoScript is really a prerequisite for implementing complex applications with TYPO3 and gives developers full control over the configuration of TYPO3 and its template engine. TypoScript enables the complete output template to be created and manipulated, giving you full control over the layout of the site. TypoScript also allows you to integrate dynamic contents, JavaScript-based menus, Flash, Graphics, etc. with ease. You have maximum control over the design of the website and can control all options that would otherwise be addressed by HTML-simple text output, formatting, and much more. TypoScript also allows you to generate graphics at run time and display different content dynamically.
Table of Contents (19 chapters)
Mastering TypoScript: TYPO3 Website, Template, and Extension Development
Credits
About the Author
Preface

Objects and Properties


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...