Book Image

TYPO3 Extension Development

Book Image

TYPO3 Extension Development

Overview of this book

Table of Contents (13 chapters)

Templating


One feature of a successful website is its unique look. A website designer should be able to modify the website appearance according to the website's purpose. It means that the plugin output should be modifiable as well. This is achieved by making the plugin output using templates.

TYPO3 has built-in support for templates. A template is a normal HTML file where data and text strings are replaced with special markers. A marker usually looks like this: ###MARKER###. There are two types of markers:

  • Plain marker (replaces the marker by data)

  • Subsection marker (replaces everything between two markers by data)

Here is an example of a template:

<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sample template</title>
</head>
<body>
<h1>Results template</h1>
<!-- ###RESULTS### begin -->
<div class="tx_myext_results">
###TEXT_RESULTS###:
<!-- ###RESULT_SUB...