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

Frames


Frame

You can create frame documents with the FRAME object.

name

This sets the name of the frame manually. Since TYPO3 assigns this value automatically, the name property should normally not be used, but only when you want to overwrite the automatically assigned name, which might be useful for accessibility considerations.

Syntax:

name = string

Example:

name = mainframe

obj

Defines the page to be loaded into the frame.

Syntax:

obj = string

Example:

obj = page

options

Permits the definition of additional URL parameters.

Syntax:

options = string

Example:

options = print=1

params

You can assign additional attributes to the<frame> tag with this.

Syntax:

params = string

Example:

params = border="0" noresize="noresize"

src

The value of the src attribute of the<frame> tag can be set manually with this property. This also has already been defined automatically by TYPO3. Only use the src property if you want to overwrite this value.

Syntax:

maxWidth = int

Example:

maxWidth = 200

Frameset

When the FRAMESET property is set, the corresponding PAGE object is automatically declared a frameset.

1,2,3,4

This defines the individual frame pages.

Syntax:

frameObj = FRAMESET

Example:

10 = FRAMESET

cols

This defines the columns.

Syntax:

cols = int/string

Example:

cols = 100,*,200

rows

The rows are defined with rows.

Syntax:

rows = int/string

Example:

rows = 200,500,*

params

Allows you to define attributes for the<frameset> tag.

Syntax:

params = string (Attribute)

Example:

params = border="0" framespacing="0"

GIFBUILDER

You can define dynamically created graphics with this object. The properties control the appearance of the image file. A special feature: You can use topical contents from the database.

backColor

Defines the background color for the entire graphic. The default is a white background.

Syntax:

backColor = [color value]

Example:

backColor = #000000 or black

format

This property defines the output format of the graphic.

Syntax:

format = string (gif oder jpg)

Example:

format = jpg

xy

Defines the size of the graphic to be displayed.

Syntax:

xy = Int

Example:

xy = 200,300

reduceColor

If the graphic is a GIF image, the colors can be reduced.

Syntax:

reduceColor = int (1-255)

Example:

reduceColor = 16

transparentBackground

When this property is set to 1, the background of the graphic is imaged transparently. In addition the color found at position 0.0 is declared to be transparent.

Syntax:

transparentBackground = boolean

Example:

transparentBackground = 1

transparentColor

Sets a transparent color. The option transparentColor.closest=1 defines that the color that is closest to the declared color is also transparent.

Syntax:

transparentColor = string (color value)

Example:

transparentColor = #cccccc

quality

This property defines the quality of a JPEG graphic.

Syntax:

quality = int (10 to 100)

Example:

quality = 30

offset

Defines the offset of all image elements from the top left corner.

Syntax:

offset = int,int

Example:

offset = 20,40

maxWidth

Defines the maximum width of the graphic.

Syntax:

maxWidth = int

Example:

maxWidth = 200

maxHeight

Defines the maximum height of the graphic.

Syntax:

maxHeight = int

Example:

maxHeight = width=100

workArea

Defines the workspace of the GIF graphic.

Syntax:

workArea = int (x),int (y),int (width),in (height)

Example:

workArea = 0,0,300,400

Menus

Menu states

State

Description

ACT

Defines the state of menu entries that are in the rootline of the current page.

ACTIFSUB

Defines the configuration for menu elements with sub-pages that were found in the rootline.

CUR

Defines the configuration for the menu element of the current page.

IFSUB

Defines the configuration for menu items that have sub-entries.

NO

Normal state of menus.

SPC

Configuration for the so-called placeholder pages. These pages of the Spacer type are used to insert spaces between menu entries.

General Properties

Property

Description

addParams

Permits additional parameters for links.

alternativeSortingField

By default, the menu items are output in the same order as they appear in the pages and tt_content table. The order of the menu items can be redefined with alternativeSortingField. For instance, should you wish to display the menu items in reverse alphabetical order, you would use alternativeSortingField = title desc.

begin

Defines the first menu element.

debugItemConf

Outputs the configuration array of the menu elements.

imgNameNotRandom

This property ensures that the image names are not defined randomly.

imgNamePrefix

Prefix for the image name.

JSWindow

When this property is set, all of the link targets are displayed in a JavaScript popup.

maxItems

Defines the maximum number of menu items.

minItems

Defines the minimum number of menu items.