Search code examples
htmltypo3typoscriptfluidtypo3-6.2.x

TYPO3: Printing variables in HTML5 via Fluid does not work


I'm using Typo3(6.2) I have problems showing my typoscript variables in my html5 file.

<!DOCTYPE html>

<html>
    <head>
        <meta charset="utf-8">
    </head>

    <body>
     ....
        <p>{content_test -> f:format.raw()}</p>
     ....
    </body>   
</html>

my typoscript:

page = PAGE
page {
 config.doctype = html5
 config.xmlprologue = none

10 = FILE
10.file = index.html  
}

fluidTemplate = FLUIDTEMPLATE
fluidTemplate {
  file = index.html

  variables{
    content_test < styles.content.get
  }
}

But I get just this output in my browser "{content_test -> f:format.raw()}"


Solution

  • you need to set the fluidtemplate in the page

    page = PAGE
    page {
        config.doctype = html5
        config.xmlprologue = none
    
        10 = FLUIDTEMPLATE
        10 {
            file = index.html
    
            variables{
                content_test < styles.content.get
            }
        }
    }