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

2.6. The template system

Rootlevel, Constants and Setup

The template system is built in a way so that a new website can actually start from whatever page in the tree! The starting point - or frontpage - is in this context called rootlevel.

If a template is meant to define the looks of a website from the rootlevel and outwards, then "Rootlevel" must be checked. Normally you would also check the fields "Clear constants and setup". By this operation every value from earlier in the tree is cleared.

Template on next level

But you can also place a template in a branch of your website. That template would by default work as an extension to templates from earlier in the tree.

Such an extension could be used to change the color of the menu if one has entered the sales-part of a website.

Include static

A really cool feature of Typo3's templates is that they can include a bunch of standard-templates (static templates) which follows Typo3 CMS as standard. These templates comes from the table "static_template" and reside in the root of the page-tree. You must have administrator access in order to view these static templates.

Including a static template means that they will be the first thing parsed at all. Typically such templates hold some standard-setup like framesets, menus or content-formatting.

Based on

Another really cool feature of Typo3's templates is that they can be based on other templates you make yourself.

Basing a template on other templates means that these other templates will be parsed after included standard-templates but before the current template.

In the template of the actual website you can then make customizations to these basis-templates.

Checkbox option: Include static AFTER basedOn

This options is available in the palette if you click the field “Include static” or “Based On”. The point of this is to let you choose whether to include the static template before or after the inclusion of any “Based On” template. You would like to do that if you for instance wants to add meta-tags with the static template “plugin.meta” record.

See this picture:

Next template

This function makes it possible to pick a template that will be loaded for every page on the next level of this actual template. This is smart when you want to make a frontpage in one layout and subpages in another layout depending on the content of the "next"-template