---
title: "Typoscript - Variablen definieren"
url: "https://www.typo3.net/d/118231-typoscript-variablen-definieren"
source: "typo3.net"
tags: ["TYPO3","TypoScript","Frage","TYPO3 6.x"]
created: "2014-06-12"
last_reply: "2014-07-02"
replies: 4
solved: true
page: 1
pages: 1
lang: "de"
---

# Typoscript - Variablen definieren

TYPO3 › TypoScript · 4 Antworten · gelöst · gestartet 2014-06-12

## Frage

**andy-man** · 2014-06-12 · [Beitrag #1](https://www.typo3.net/d/118231-typoscript-variablen-definieren/1)

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

```typoscript
<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

```typoscript
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.

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

Was mache ich da falsch.

Danke
andy-man

## Beste Antwort

**andy-man** · 2014-07-02 · [Beitrag #5](https://www.typo3.net/d/118231-typoscript-variablen-definieren/5)

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

## Antworten

### [#2](https://www.typo3.net/d/118231-typoscript-variablen-definieren/2) · freeatweb · 2014-06-12

Hallo,

probier folgendes:

```typoscript
variables {
    logo < lib.logo
}
```

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

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

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

Lg

### [#3](https://www.typo3.net/d/118231-typoscript-variablen-definieren/3) · andy-man · 2014-06-13

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.

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

andy-man

### [#4](https://www.typo3.net/d/118231-typoscript-variablen-definieren/4) · freeatweb · 2014-06-13

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

```typoscript
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?

### [#5](https://www.typo3.net/d/118231-typoscript-variablen-definieren/5) · andy-man · 2014-07-02 · Beste Antwort

(Text siehe oben unter „Beste Antwort“.)

---

Quelle: „Typoscript - Variablen definieren“, typo3.net, https://www.typo3.net/d/118231-typoscript-variablen-definieren
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
