Christophe Segura
Christophe Segura

Reputation: 1

Typo3 Content-objet HTML doesn't display

I'm beginner in typoscript, I understand the principle, but I have a small problem from the start.
On my homepage in the setup field of the template-tools, if I put:

page.10 = TEXT
page.10.value = Hello World

It works, I have my display,
however, if I put:

page.10 = HTML
page.10.value = Hello World

it does not show me the text anymore ...
What do not I understand?

page = PAGE
page.typeNum = 0

page.10 = HTML
page.10.value = Hello World

Upvotes: 0

Views: 368

Answers (2)

Bernd Wilke πφ
Bernd Wilke πφ

Reputation: 10791

Since TYPO3 6.0 there no longer is a HTML object in typoscript. So there is no rendering.

Try to avoid examples from very old days as TYPO3 has changed a lot.

You could look for typoscript errors in the TSOB (TypoScript Object Browser) or Template Analyzer
(see: Web -> Templates -> ... drop down selection on top of page)

Upvotes: 1

BastianBalthasarBux
BastianBalthasarBux

Reputation: 446

As mentioned above, the HTML Content object has gone.

Valid solution: just use the TEXT object for such HTML output. Note the stdWrap.htmlspecialchars thing. (Read more: https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Functions/Stdwrap.html#htmlspecialchars)

If you use both in connection correctly, it is a save and recommended way. Although maybe HTML output should sit better in a FLUID template or partial. But still there are some usecases for our approach.

Upvotes: 0

Related Questions