typo3fluidtypo3-8.xfluid-styled-content

Typo3 Fluid renders html in the frontend instead of including the html to the homepage



i am trying to use Typo3 Fluid with Backendlayouts. But instead of rendering the Content Elements it renders the Html of the Content elements. For example i have a simple Text-Element in the Backend with "some text". It will show <p>some text</p> in the Frontend not "some text" as expected. The html of the homepage looks like this:

<p>
&lt;p&gt;test&lt;/p&gt;
</p>

The viewhelper i used to render the content looks like this:

<div class="col-md-4">
    <f:cObject typoscriptObjectPath="lib.dynamicContent" data="{pageUid: '{data.uid}', colPos: '11'}" />
</div>

As you can see there is no <p></p> tag at all in my Default.html.
I know that the Text element itself uses the <p> </p> Tags in the backend but i am surprised they get rendered as text and also included in the html. I just want the html of the Contentelement to be included in the html of the homepage
I guess the mistake could be in this typoscript for the lib.dynamicContent in my custom theme extension:

lib.dynamicContent = COA
lib.dynamicContent {
   10 = LOAD_REGISTER
   10 {
      colPos.cObject = TEXT
      colPos.cObject {
         field = colPos
         ifEmpty.cObject = TEXT
         ifEmpty.cObject {
            value.current = 1
            ifEmpty = 0
         }
      }
      pageUid.cObject = TEXT
      pageUid.cObject {
         field = pageUid
         ifEmpty.data = TSFE:id
      }
      contentFromPid.cObject = TEXT
      contentFromPid.cObject {
         data = DB:pages:{register:pageUid}:content_from_pid
         data.insertData = 1
      }
      wrap.cObject = TEXT
      wrap.cObject {
         field = wrap
      }
   }
   20 = CONTENT
   20 {
      table = tt_content
      select {
         includeRecordsWithoutDefaultTranslation = 1
         orderBy = sorting
         where = {#colPos}={register:colPos}
         where.insertData = 1
         pidInList.data = register:pageUid
         pidInList.override.data = register:contentFromPid
      }
      stdWrap {
         dataWrap = {register:wrap}
         required = 1
      }
   }
   30 = RESTORE_REGISTER
 }

This is the Default.html

<f:layout name="Default" />
<f:section name="Main">
   <main role="main">
      <div class="container">
         <div class="row">
            <div class="col-md-4">
                <f:cObject typoscriptObjectPath="lib.dynamicContent" data="pageUid: '{data.uid}', {colPos: '11'}" />
            </div>
            <div class="col-md-4">
                <f:cObject typoscriptObjectPath="lib.dynamicContent" data="pageUid: '{data.uid}', {colPos: '12'}" />
            </div>
            <div class="col-md-4">
                <f:cObject typoscriptObjectPath="lib.dynamicContent" data="pageUid: '{data.uid}', {colPos: '13'}" />
            </div>
         </div>
      </div>
   </main>
</f:section>

Thank you for your time and please comment if you need more information to be able to help me. Daniel


Solution

  • I found the mistake and it was a basic one i guess. I did not include the Fluid Content Elements Css - only the Fluid Content Elements. Thanks for your input. If you have this problem include it in your typoscript or in your root-template in the backend. It should appear in "includes"