Zum Inhalt springen

Fluid Template mit Layouts+Partials in Typo3 8

Erstellt am 6. Juli 2016 · 2 Antworten · letzte Antwort am 4. Juli 2017

Tags: Fluid, Frage

sxbxstxxn ·

Hallo,

ich habe ein neues Typo3 in Version 8 (!!) aufgesetzt. Jetzt bekomme ich aber bei der Verwendung des Fluid Templates immer folgende Fehlermeldung:
"Oops, an error occurred! Code: 20160706102831e0ac8e3b"

bzw nachdem ich

config.contentObjectExceptionHandler = 0

ergänzt habe folgende Fehlermeldung:
"Oops, an error occurred!
PHP Catchable Fatal Error: Object of class TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode could not be converted to string in /www/htdocs/XXXXXXX/typo3_src-8.0.1/vendor/typo3fluid/fluid/src/Core/Compiler/TemplateCompiler.php line 175"

Ich habe bisher noch gar nicht viel gemacht.

page = PAGE
page.10 = FLUIDTEMPLATE
page.10 {	
	file = fileadmin/src/tmpl/template.html
	layoutRootPath = fileadmin/src/tmpl/Layouts/
	partialRootPath = fileadmin/src/tmpl/Partials/
	setting.layout = default
	variables {
		content < styles.content.get		
		sometext = TEXT
		sometext.value = Here's some text.
	}
}

#we also create a typoscript-menu
lib.menu = HMENU
lib.menu{
  1 = TMENU
  1.NO.wrapItemAndSub = <li>|</li>
}

template.html

<f:layout name="{settings.layout}" />
<f:section name="menu">
  <ul id="nav"><f:cObject typoscriptObjectPath="lib.menu" /></ul>
</f:section>

<f:section name="content">
<f:format.raw>{content}</f:format.raw>
</f:section>

default.html

<div id="menu">
	 <f:render section="menu" />
</div>
<div id="content">
	 <f:render section="content"/>
</div>

Hat irgendjemand eine Idee? Finde da einfach keinen Fehler... Wenn ich nur das Template nehme, ohne mit Layout / Partial zu arbeiten, dann funktioniert es.

ola2017 ·

Ich habe gleiche Geschichte....
Jetzt habe ich Typo3 8.7.0 - irgendwie fluid funktioniert nicht. Wenn ich einfach Tamplate # Default PAGE object:
page = PAGE
page.10 = TEXT
page.10.value = HELLO WORLD! erstelle - dann funktioniert. Momenten bekomme ich eine leere Seite, wenn ich Fluidtemplate in setup.ts einbinde.(((((

pixelrolf ·

Hallo,

ich hatte ein ähnliches Problem und bin soeben auf diesen Thread gestoßen.

Ich konnte das Problem lösen indem ich den Partial umbenannt habe, sodass er mit einem Großbuchstaben anfängt.

statt footer.html -> Footer.html, mit großem "F".

Vielleicht hilft es ja dem ein oder anderen.