Attention

TYPO3 v6 has reached its end-of-life April 18th, 2017 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.

There is no further ELTS support. It is strongly recommended updating your project.

css_styled_content

It would be tiresome to program this for every TYPO3 installation, because the elements are the same, or have very similar functionality. For this reason, TYPO3 offers "static templates". The current version comes with the TYPO3 system extension "css_styled_content". It has a meaningful definition for every existing type of content element.

The usage is comparably easy. The definitions are available as tt_content objects.

page.10.renderObj < tt_content

This assignment also is the default configuration of the CONTENT object. If the static template "css_styled_content" is available, there is no need to explicitly set the parameter "renderObj".

So for every content element in TYPO3, there is a corresponding definition in css_styles_content. In the object browser, it would look like this:

Definitions in the Object Browser.

So it is comprehensible, which content element is configured in which way. If a content element has to be configured completely differently, then this can be done with tt_content.internal identifier of the content element. Here follows an example of how the standard properties of the header can be overwritten:

# Because TYPO3 saves everything in one big array, the properties that are not overwritten
# are preserved and could result in strange behavior. That is why all old properties should be deleted.
tt_content.header >

# Every header will be rendered with h1 tags, independently from the properties in the content element.
tt_content.header = TEXT
tt_content.header.stdWrap.wrap = <h1>|</h1>
tt_content.header.stdWrap.field = header

But, not only doesn't "renderObj" have to be recreated; the CONTENT object itself is also already defined in css_styled_content.