Rendering in the Frontend

The explanations on this page don't show how to display an RTE but rather, describe how rendering of content should be done in the frontend when it was entered with help of an RTE.

Fluid templates

Rendering in TYPO3 is nowadays done mostly with Fluid templates.

RTEs enrich content in most cases with HTML, therefore it's advisable to use the Fluid ViewHelper format.html for this kind of content:

<f:format.html><p>Visit the <a href="t3://page?uid=51">example page</a>.</p></f:format.html>
Copied!

The result might still be missing some important aspects. One example are links of the form t3://page?uid=51 that need to be processed. Usually those links should be transformed already because the ViewHelper is using by default lib.parseFunc_RTE to parse the content.

Nevertheless it's possible to define the parsing function explicitly and also to define a different parsing function:

<f:format.html parseFuncTSPath="lib.parseFunc"><p>Visit the <a href="t3://page?uid=51">example page</a>.</p></f:format.html>
Copied!

TypoScript

Rendering is sometimes done by TypoScript only, in those cases it's possible to use lib.parseFunc_RTE too for parsing:

20 = TEXT
20.value = Visit the <a href="t3://page?uid=51">example page</a>.
20.wrap = <p>|</p>
20.stdWrap.parseFunc < lib.parseFunc_RTE
Copied!

So for fields of the content-table in the database the TypoScript could look like this:

20 = TEXT
20.field = bodytext
20.wrap = <p>|</p>
20.stdWrap.parseFunc < lib.parseFunc_RTE
Copied!

Further details

The transformation process during content-rendering is highly configurable. You can find further information here: