10.02.2013 Views

PHP Programming Language - OpenLibra

PHP Programming Language - OpenLibra

PHP Programming Language - OpenLibra

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TYPO3 330<br />

Design<br />

The system uses a special language called TypoScript. TypoScript can be used to fetch data from the database,<br />

process this data and generate web content. Usually TypoScript includes one of available template engines (such as<br />

automaketemplate or TemplaVoila). These template engines create output based on one or more HTML templates.<br />

TYPO3 defines various types of data. Standard types include: text, image, text with image, html, table, video, lists,<br />

etc. These types can be extended by a user through plugins. The most fundamental type is "page". Every element that<br />

can appear to the user, belongs to a certain page. Pages are hierarchical with no limit to nesting level. There are<br />

special page types such as shortcuts (viewing this page directs the user to another page), mount points (allows to<br />

mount a part of the page tree at the mount point), external URL, etc.<br />

Logically TYPO3 consists from two parts: the Frontend and the Backend. The Frontend is a part responsible for<br />

generation and display of web content. The Backend is responsible for administration.<br />

Almost everything is TYPO3 is made to be pluggable and extendable. For example, TYPO3 includes many user<br />

authentication methods (such as RSA shared keys or OpenID). They are implemented as extension to the main<br />

system.<br />

TYPO3 is a complex framework with almost unlimited possibilities. Developers may find information at various<br />

places, such as:<br />

• the official developer's resource (typo3.org [3] )<br />

• TYPO3 wiki (wiki.typo3.org [4] )<br />

• TYPO3 mailing lists (lists.typo3.org [5] ). Lists also have a usenet interface and are readable with a newsreader.<br />

TypoScript<br />

The basic syntax is:<br />

[objectpath].[attribute] [operator] [value]<br />

Operators include:<br />

• = assignment of a value<br />

• < copy a whole object<br />

• =< insert a reference<br />

• > remove object<br />

Examples:<br />

page.10 = TEXT<br />

page.10.value = Hello, world!<br />

It must be noted that TypoScript is not a programming language. The following code will trigger no action in<br />

TYPO3 while it will trigger item creation and removal in programming languages:<br />

page.10 = TEXT<br />

page.10.value = Hello, world!<br />

page.10 ><br />

In this example a TypoScript object "page.10" was created and immediately removed. When TYPO3 parses<br />

TypoScript, it will remove object declaration of "page.10" before actually processing created objects.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!