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

Prerequisites


This book is targeted at experienced TYPO3 users and is meant to help you primarily during your day-to-day work. However, before you start with TypoScript, we must clarify the selection of packages and extensions that need to be installed to use this book. It does not matter in principle which TYPO3 package you have installed—TypoScript can be learned with any package. The following instructions are based on an installed dummy package.

Dummy Package

You of course want to use TypoScript for your own projects. As already mentioned, it does not matter in principle which TYPO3 package you have installed. However, for starting out with TypoScript the dummy package is recommended—you get an empty database and can experiment with TypoScript as much as you want. The installation of the dummy package is not shown here. You can download the dummy package from http://typo3.org/1274.0.html.

Setting up an Example Page Structure

You have bought this book to learn to use TypoScript in your own projects. Here TypoScript is explained using small independent examples, so that the book serves as a reference without you having to work through a large example or case study. However, some topics, such as the template auto-parser can only be explained with the help of a detailed example page structure. So in order to avoid having to define a new example each time in such cases, the following steps define a specific one. You can use the book quite well even if you don't use this example structure; however it makes things easier. The time spent on creating the example pages is less than 5 minutes.

First right-click TYPO3 and point to New. In the right frame New record click on Page (inside):

Give this page a title (e.g. Index); disable the Hide page checkbox in the upper area of the window and save the page.

Call the Index page and click on Functions in the left menu. Make sure that the Create multiple pages wizard is selected in the drop-down list as pages can be created quite easily using this wizard.

All you have to do is to enter the desired page titles.

The pages are created via the Create pages button. You can inspect the results immediately in the page tree.

You can now assign sub-pages to the newly created pages. To do this, point to About Us, select the Create multiple pages wizard again, and create a few sub-pages.

Repeat these steps for additional pages. The result should look like this in the page tree:

That's it. You can always build on this sample installation and keep coming back to it.