---
title: "Template wechseln ??"
url: "https://www.typo3.net/d/27031-template-wechseln"
source: "typo3.net"
tags: ["Allgemein","Frage"]
created: "2005-07-08"
last_reply: "2005-07-08"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# Template wechseln ??

Allgemein · 1 Antwort · gestartet 2005-07-08

## Eröffnungsbeitrag

**LuckyLuke** · 2005-07-08 · [Beitrag #1](https://www.typo3.net/d/27031-template-wechseln/1)

Hi,
ich möchte 2 variablen deklarieren und dann darauf zugreifen.
Wie muß das folgende Script richtig lauten ??

temp.kontakt = TEXT
temp.kontakt.value = 1

temp.impressum = TEXT
temp.impressum.value = 2

plugin.tx_automaketemplate_pi1 {

   [PIDinRootline = temp.kontakt]
   content = FILE
   content.file = fileadmin/template/main/template_kontakt.html

   [PIDinRootline = temp.impressum]
   content = FILE
   content.file = fileadmin/template/main/template_impressum.html

   elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY

    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title

    TD.all = 1
  }

   relPathPrefix = fileadmin/template/main/
}

Gruß Luke

## Antworten

### [#2](https://www.typo3.net/d/27031-template-wechseln/2) · Nicklas · 2005-07-08

ich weiß nicht viel über bedingungen, aber was ich weiß ist: keine bedingungen in diesen Klammern: "{}"

```typoscript
temp.kontakt = TEXT
temp.kontakt.value = 1

temp.impressum = TEXT
temp.impressum.value = 2


[PIDinRootline = temp.kontakt]
plugin.tx_automaketemplate_pi1.content = FILE
plugin.tx_automaketemplate_pi1.content.file = fileadmin/template/main/template_kontakt.html

[PIDinRootline = temp.impressum]
plugin.tx_automaketemplate_pi1.content = FILE
plugin.tx_automaketemplate_pi1.content.file = fileadmin/template/main/template_impressum.html

plugin.tx_automaketemplate_pi1.elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY

HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title

TD.all = 1
}

relPathPrefix = fileadmin/template/main/
```

allerdings weiß ich nicht, ob das ding an sich funzt...

mfg

---

Quelle: „Template wechseln ??“, typo3.net, https://www.typo3.net/d/27031-template-wechseln
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
