Login / Status
developer.Resource
Home . Documentation . Document Library . Core Documentation
Sponsors
hosted by punkt.deTYPO3 and Open Source MagazineAOE Media

1.3. Standard templates

Introduction

Typo3 offers an easy way to create websites and get started with TypoScript. A bunch of standard templates is bundled with Typo3.

Most websites based on Typo3 rely on TypoScript templates. In order to understand templates, you should read this introduction to TypoScript. You'll also find thorough information in the TSref.

If you want to test some of the standard-templates and study live examples, please refer to the demosite at demo.typo3.com.

static_template table

The static templates are records from the table "static_template". The records are root-level records, which means they are always found in the root of the pagetree and can only be viewed by administrators. The table is also "read only" (setup in tables.php). This is because "static_template" contains records which are not meant to be changed by anyone. They act as preset chunks of TypoScript code. The table "static_template" is distributed in new versions (with added records) with every Typo3-version.

Below you see the content of the static template as it was in september 2000. This may have changed for the current version of Typo3. But it's useful for explain how it works:

  1. "template: ...": This is the standard templates. When you want to create a website based on a standard-template you add this to the top of the list of included static-templates in your template.

    All standard templates includes the "content (default)" template for content-rendering.  

  2.  "content (default)": This template contains a cObject "tt_content" which is used to render the content-items of a page. Included by all templates so far. Some of the more exotic types (CType) of content-items are not rendered though. "styles.content (default)" is included in this template.  

  3. "styles.content (default)": This contains a lot of predefined TS-objects for use with eg. content-rendering, "powered-by"-logos, content-inserting and so on. The objects are widely use by "content (default)" and many properties are adjustable as constants for easy change of behavior.  

  4. "cSet (default)": This is kind of extension to the "styles.content (default)" template. The point is to substitute eg. target-definitions in many objects of the "styles.content (default)"-template with a common constant, which makes it much more convenient to adjust the target through all objects. It also takes care of such as background colors, font-faces/colors. It's a layer on top. Very useful for fast creation of websites based on the standard-templates; Include the standard template. Include "cSet (default)". Override some parameters of "cSet. ....". See how it's used in the templates on the demo-site.  

  5. "frameset...": Different standard framesets. Used by some standard templates.  

  6. "styles...": Some standard objects like menus, sitemaps, headers and so on. This section may grow with lots of interesting presets like boards, catalogues, calender-systems and so on.

Content rendering details

Read the PDF-document content_rendering.pdf or refer to

http://www.typo3.com/Content-rendering_an.1102.0.html

Typical setup of a standard template

This is the hierarchy of a fictive website based on the standard tempalte BUG:

In the Template Analyzer it looks like this:



TYPO3 Core API

TSRef

TYPO3 Coding Guidelines