Zum Inhalt springen

Typoscript - Variablen definieren

Erstellt am 12. Juni 2014 · 4 Antworten · letzte Antwort am 2. Juli 2014

Tags: TYPO3 6.x, Frage

andy-man ·

Hallo,
ich verstrehe leider die Welt nicht mehr - oder stehe neben mir.
im root.t3s steht folgendes

<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/Configuration/TypoScript/lib.logo.t3s">
...

	10 = FLUIDTEMPLATE
	10 {
		......	
		partialRootPath = fileadmin/Resources/Private/Partials/
		layoutRootPath = fileadmin/Resources/Private/Layouts/
		
		variables {
		  logo =< lib.logo
 ...

in der lib.logo.t3s

lib.logo = IMAGE
lib.logo {
     file = fileadmin/templates/images/logo.png
     linkWrap = <a href="./index.php">|</a>
}

leider wird das Logo nicht angezeigt.

Wenn ich aber das Script direkt in root.ts eingebe, dann funktioniert es.

...
variables {
   logo =IMAGE
   logo {
     file = fileadmin/templates/images/logo.png
     linkWrap = <a href="./index.php">|</a>
}
....

Was mache ich da falsch.

Danke
andy-man

freeatweb ·

Hallo,

probier folgendes:

variables {
    logo < lib.logo
}

sinnvoller wäre es allerdings, du fügst in deinem Template ein Typoscript-Object ein

 <f:cObject typoscriptObjectPath="lib.logo" />

so kannst du TS-Variablen direkt im Template/Partial/Layout aufrufen.

Lg

andy-man ·

Danke für die Information, habe beides versucht - aber leider kein Ergebnis mit dem Logo.
Die direkte Einbindung mit dem Typoscript-Object geht mit allen anderen TS-Variablen.
Stimmt denn das TS für die Einbindung des Logos in Typo3 Version 6.2?

auch das Script funktioniert nicht.

lib.logo = COA
	lib.logo {
	10 = IMAGE 
	10 {
		file = fileadmin/templates/images/logo.png
		linkWrap = <a href="./index.php">|</a>
		}
	}

andy-man

freeatweb ·

warum definierst du lib.logo als COA und nicht gleich als IMAGE?

ich glaube der linkWrap könnte der Auslöser für das Problem sein.
Probier mal folgendes

lib.logo = COA
lib.logo {
     10 = IMAGE
     10 {
        file = fileadmin/templates/images/logo.png
        stdWrap.typolink.parameter = PID der Startseite
        
     }
}

stimmt der Pfad zum Logo?

andy-man · · Beste Antwort

Hallo,
die Ursache des Problems war nicht das TS sondern dass die Datei ausversehen nicht im UFT8-Format abgespeichert wurde.