[TYPO3-german] Seiten ID abhängige Templates laden

Matthias Gmeiner matthias at matthiasgmeiner.com
Wed Mar 22 17:43:05 CET 2017


Hi. 

Wie kann ich in meinem TypoScript eine If Schleife einbauen die ID der Seite prüft oder ob Parent die ID hat .
Ich würde hier gerne.

 template = FILE
 template.file = fileadmin/templates/index-.html

so etwas einbauen

 template = FILE

 IF Page has ID oder Parent of Page has id
  template.file = fileadmin/templates/index-.html


 IF Page has ID oder Parent of Page has id
  template.file = fileadmin/templates/index-2-.html


 IF Page has ID oder Parent of Page has id
  template.file = fileadmin/templates/index-3-.html



temp.maintemplate = COA
temp.maintemplate {
  10 = COA
  10 {
    if.isTrue.numRows < styles.content.getRight
    10 = TEMPLATE
    10 {
       
      template = FILE
      template.file = fileadmin/templates/index-.html
    }
  }
  20 = COA
  20 {
    if.isFalse.numRows < styles.content.getRight
    10 = TEMPLATE
    10 {
       
      template = FILE
      template.file = fileadmin/templates/index-1-spalte.html
    }
  }
}


page.10 < temp.maintemplate


More information about the TYPO3-german mailing list