---
title: "Conditions, misverständnis oder Fehler?"
url: "https://www.typo3.net/d/49308-conditions-misverstaendnis-oder-fehler"
source: "typo3.net"
tags: ["Allgemein","Frage"]
created: "2006-09-04"
last_reply: "2006-09-04"
replies: 4
solved: false
page: 1
pages: 1
lang: "de"
---

# Conditions, misverständnis oder Fehler?

Allgemein · 4 Antworten · gestartet 2006-09-04

## Eröffnungsbeitrag

**Salz** · 2006-09-04 · [Beitrag #1](https://www.typo3.net/d/49308-conditions-misverstaendnis-oder-fehler/1)

Ich bin mir nicht ganz sicher ob ich die Conditions falsch verstanden habe, oder ich hier einfach ein fehler gemacht habe.
Jedenfalls möchte ich wenn die ID=6 aufgerufen wird (1 ist nen Shortcut), das dann ein anderes template geladen wird. Allerdings scheint die Condition etwas falsch behandelt zu werden, da immer ihr Inhalt angezeigt wird, egal auf welcher seite man ist.

```typoscript
temp.menu = HMENU
temp.menu.1 = TMENU
temp.menu.1 {
  NO.allWrap = <li> | </li>
  ACT = 1
  ACT.allWrap = <li class="active"> | </li>
}

[globalVar = TSFE:page|pid=6, TSFE:page|pid=1, TSFE:id=1, TSFE:id=6]
plugin.tx_automaketemplate_pi1 {
  content = FILE
  content.file = fileadmin/template/main/index.html
  elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY
    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title
    DIV.id.main = 1
    UL.id.menu = 1
  }
   # Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
  template =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_BODY
  subparts.menu < temp.menu   
  subparts.main < styles.content.get
}

[global]
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
  content = FILE
  content.file = fileadmin/template/main/other.html
  elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY
    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title
    DIV.id.main = 1
    UL.id.menu = 1
  }
  relPathPrefix = fileadmin/template/main/
}
   # Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
  template =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_BODY

 subparts.menu < temp.menu   
 subparts.normal < styles.content.get
 subparts.right_content < styles.content.getRight
 subparts.left_content < styles.content.getLeft
 subparts.border < styles.content.getBorder
}

   # Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <head>-tags
  workOnSubpart = DOCUMENT_HEADER
}
#
# S I T E M A P S
# nicht in neuem Fenster
tt_content.menu.20.0.1.target = _self
tt_content.menu.20.1.1.target = _self
tt_content.menu.20.2.1.target = _self
tt_content.menu.20.3.1.target = _self
tt_content.menu.20.4.1.target = _self
tt_content.menu.20.5.1.target = _self
tt_content.menu.20.6.1.target = _self
tt_content.menu.20.7.1.target = _self


  # Default PAGE object:
page = PAGE
page.typeNum = 0
page.10 < temp.mainTemplate
page.headerData.10  < temp.headTemplate
```

## Antworten

### [#2](https://www.typo3.net/d/49308-conditions-misverstaendnis-oder-fehler/2) · einpraegsam.​net · 2006-09-04

Ganz einfacher Vorschlage ohne TS:
"Template on next Level"

### [#3](https://www.typo3.net/d/49308-conditions-misverstaendnis-oder-fehler/3) · steffenk · 2006-09-04

oder einfach die condition nach unten - so überschreibst Du sie ja wieder.

### [#4](https://www.typo3.net/d/49308-conditions-misverstaendnis-oder-fehler/4) · Salz · 2006-09-04

Ich habs jetzt erst mal so, nur hab ich jetzt noch das problem, des jetzt kein Content mehr eingefügt wird.

edit: Btw, die Startseite soll ein Vier-Boxen-Layout haben, alle anderen Seiten (auch selber ebene) sollen ein Ein-Boxen-Layout benutzen.

```typoscript
page = PAGE
page.typeNum = 0

temp.menu = HMENU
temp.menu.1 = TMENU
temp.menu.1 {
  NO.allWrap = <li> | </li>
  ACT = 1
  ACT.allWrap = <li class="active"> | </li>
}

[globalVar = TSFE:id = 1, TSFE:id = 6]
plugin.tx_automaketemplate_pi1 {
  content = FILE
  content.file = fileadmin/template/main/index.html
  elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY
    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title
    DIV.id.main = 1
    UL.id.menu = 1
  }
  relPathPrefix = fileadmin/template/main/
}
   # Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
  template =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_BODY
  subparts.menu < temp.menu   
  subparts.main < styles.content.get
}
# ------- END -------> globalVar = TSFE:id = 1, TSFE:id = 6 
[else]
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
  content = FILE
  content.file = fileadmin/template/main/other.html
  elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY
    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title
    DIV.id.main = 1
    UL.id.menu = 1
  }
  relPathPrefix = fileadmin/template/main/
}
   # Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
  template =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_BODY

 subparts.menu < temp.menu   
 subparts.normal < styles.content.get
 subparts.right_content < styles.content.getRight
 subparts.left_content < styles.content.getLeft
 subparts.border < styles.content.getBorder
}
[end]

   # Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <head>-tags
  workOnSubpart = DOCUMENT_HEADER
}
#
# S I T E M A P S
# nicht in neuem Fenster
tt_content.menu.20.0.1.target = _self
tt_content.menu.20.1.1.target = _self
tt_content.menu.20.2.1.target = _self
tt_content.menu.20.3.1.target = _self
tt_content.menu.20.4.1.target = _self
tt_content.menu.20.5.1.target = _self
tt_content.menu.20.6.1.target = _self
tt_content.menu.20.7.1.target = _self


  # Default PAGE object:
page = PAGE
page.typeNum = 0
page.10 < temp.mainTemplate
page.headerData.10  < temp.headTemplate
```

### [#5](https://www.typo3.net/d/49308-conditions-misverstaendnis-oder-fehler/5) · Salz · 2006-09-04

Ok, der Fehler ist auf meinem Mist gewachsen, denn ich habe die beiden Designvorlagen vertauscht.

---

Quelle: „Conditions, misverständnis oder Fehler?“, typo3.net, https://www.typo3.net/d/49308-conditions-misverstaendnis-oder-fehler
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
