TYPO3 extensions/plugins creating <p> tags in HTML pages

typo3 create folder
typo3 repository

I created an extension and plugin using extension builder which generates some HTML code to a file fileadmin/templates/List.html.This content goes into my web page's template.html as

<f:section name="some-content">
<f:format.html> {some_content} </f:format.html> 

some_content comes from my Typoscript template

some_content < styles.content.get
some_content.select.where = colPos = 1

The plugin is attached from a backend layout

The problem is that in my HTML page I get plugin information in <p> tags

<p class="bodytext">&nbsp;</p>
<p class="bodytext">    <!--  CONTENT ELEMENT, uid:260/list [begin] --></p>
<p class="bodytext">&nbsp;</p><div id="c260" class="csc-default"><p class="bodytext">&nbsp;</p>
<p class="bodytext">        <!--  Plugin inserted: [begin] --></p>
<p class="bodytext">&nbsp;</p>
<p class="bodytext">        <!--  Plugin inserted: [end] --></p>
<p class="bodytext">&nbsp;</p></div><p class="bodytext">    <!--  CONTENT ELEMENT, uid:260/list [end] --></p>
<p class="bodytext">&nbsp;</p>

And this messing up my CSS.

<f:format.html> uses RTEparser to parse the content in it. Each new line will be wrapped with a p-tag.

Use <f:format.raw> to avoid HTML escaping.

Configuring and embedding Frontend Plugins, The action should be called on by a frontend-plugin. We've \TYPO3\CMS\​Extbase\Utility\ExtensionUtility::registerPlugin( 'extension_key', 'List', 'The The first argument is the extension key ( extension_key in our example).

add following lines in template script of root

In Constants :

content.RTE_compliant = 0

In Setup :

tt_content.stdWrap.dataWrap >

Configuring the Plugin, We've already addressed the configuration of a simple frontend-plugin in chapter 4 in \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( $_EXTKEY, '​List', 'The The first argument is the extension key (sjr_offers in our example).

As you want to use <f:format.html> i would prefer to still use it, but with its parseFunc attribute.

<f:format.html parseFuncTSPath="">{some_content}</f:format.html>

There you can assign the parse functionality. (An empty value ignores the standard behaviour and the default display of P tags.

Creating a First Extension, The static method \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() of the class offers several arguments. With the first we assign the extension key (it​ 

Creating a first extension, In this chapter you learn the basics of an extension based on Extbase and fluid. You build a minimalistic extension, which is reduced to the 

Extbase Reference, In this chapter you learn the basics of an extension based on extbase and fluid. You build up a minimalistic extension, which is reduced to the absolutely 

The Example Extension, php , to configure a plugin. The reason lays in the architecture of TYPO3: file ext_localconf.php is evaluated in the frontend and file Configuration/ 

  • Wont this effect my HTML tags in the page ? I haven't tried <f:format.raw> yet though.
  • thanks matox, this one worked the best, without editing any ts