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.
Note
For including an RTE in the frontend you can read Using an RTE in the frontend.
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.
for this kind of content:
<f:format.html><p>Visit the <a href="t3://page?uid=51">example page</a>.</p></f:format.html>
The result might still be missing some important aspects. One example are links
of the form t3://
that need to be processed. Usually those links should
be transformed already because the ViewHelper is using by default lib.
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>
Note
Details to format.
can be found in the ViewHelper Reference.
TypoScript
Rendering is sometimes done by TypoScript only, in those cases it's possible to
use lib.
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
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
Note
Usually the TypoScript function typolink
should be used for single links,
but for text that might include several links that is not possible easily.
Therefore lib.
is used to simplify and streamline this process.
Details to parse
can be found in the TypoScript Reference:
Further details
The transformation process during content-rendering is highly configurable. You can find further information here: