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

Manipulating SQL Statements


You use the CONTENT cObject in order to have TYPO3 output content from the database. You will have to enter a few additional statements so that this object knows which table to get the contents from. By default, the page content from the tt_content table is stored. Use the table property of the CONTENT object to access it. An example:

page.10.marks.RIGHT= CONTENT
page.10.marks.RIGHT {
table = tt_content
}

It is possible to loop through records with the CONTENT object. That way, all of the records that are defined within the current page are output. The only exceptions would be hidden pages or pages that don't allow access rights.

Arranging Content

Content can also be read out directly from the database by the use of CONTENT objects. TYPO3 uses a complex SQL query for this, which looks like this when simplified:

SELECT * FROM [.table] WHERE pid = [PID]

You can now use TypoScript to execute this SQL query. It is an advantage if you have SQL experience, but you...