Zum Inhalt springen

Conditions, misverständnis oder Fehler?

Erstellt am 4. September 2006 · 4 Antworten · letzte Antwort am 4. September 2006

Tags: Frage

Salz ·

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.

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
Salz ·

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.

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