---
title: "Problem mit dem Template Selector"
url: "https://www.typo3.net/d/7495-problem-mit-dem-template-selector"
source: "typo3.net"
tags: ["Extensions","Frage"]
created: "2003-11-26"
last_reply: "2003-12-02"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# Problem mit dem Template Selector

Extensions · 1 Antwort · gestartet 2003-11-26

## Eröffnungsbeitrag

**susie** · 2003-11-26 · [Beitrag #1](https://www.typo3.net/d/7495-problem-mit-dem-template-selector/1)

Hallo Typo3 Gemeinde,

kriege den Template Selector einfach nicht ans laufen !!
Extention ist eingebunden, die Pfade zu meinen Ordern stimmen, aber ich habe einfach keine Ausgaben.

Hier ist die Programmierung für das Setup-Field.

Danke und liebe Grüße

SU

// --- SET UP TEMPLATE SELECTOR -----------------------------------------------

plugin.tx_rlmptmplselector_pi1 {

// Define the paths leading to our HTML template files
   templatePathMain = fileadmin/templates/main/
   templatePathSub = fileadmin/templates/sub/

// Define the filenames used as the default HTML templates
   defaultTemplateFileNameMain = template_1.html
   defaultTemplateFileNameSub = subtemplate_1.html

// If there is a page having no template selected, use a template
      // selected earlier in the rootline. If there is none, use the default
    inheritMainTemplates = 1
    inheritSubTemplates = 1

#######################################

 # Template type. Default is "main". Allowed   values: "main", "sub"
    templateType = main

# Refers to the default template object to use
      # if no value is set for the current page
      defaultTemplateObjectMain = 10
      defaultTemplateObjectSub = 10

# Contains TEMPLATE objects for TS mode (vs. external HTML file mode)
   templateObjects.main =
   templateObjects.sub =

}

// --- CONFIGURE THE AUTOMAKETEMPLATE EXTENSION --------------------------

plugin.tx_automaketemplate_pi1 {

content < plugin.tx_rlmptmplselector_pi1
    elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY

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

    TD.all = 1
    DIV.all = 1
  }

  relPathPrefix = fileadmin/templates/main/
}

// --- CREATE TS TEMPLATES FOR MAIN AND CONTENT AREA ------------------

temp.headTemplate = TEMPLATE
temp.headTemplate {
  template =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_HEADER
}

temp.contentAreaTemplate = TEMPLATE
temp.contentAreaTemplate {

template =< plugin.tx_automaketemplate_pi1

// Modify the template selector config: This is a sub template!
   template.content.templateType = sub

workOnSubpart = DOCUMENT_BODY
   subparts.content < styles.content.get
}

temp.mainTemplate  = TEMPLATE
temp.mainTemplate {

template =< plugin.tx_automaketemplate_pi1

// Modify the template selector config: This is a sub template!
   template.content.templateType = main
   template.content.templateType = fileadmin/templates/main/template_1.html

workOnSubpart = DOCUMENT_BODY
    subparts.content-normal < temp.contentAreaTemplate
}

// --- CREATE THE MAIN PAGE OBJECT -------------------------------------------

page = PAGE
page {
   typeNum = 0
   headerData.10 < temp.headTemplate
   10 < temp.mainTemplate

}

## Antworten

### [#2](https://www.typo3.net/d/7495-problem-mit-dem-template-selector/2) · susie · 2003-12-02

Hat sich erledigt !! Code läuft so wie angezeigt.

---

Quelle: „Problem mit dem Template Selector“, typo3.net, https://www.typo3.net/d/7495-problem-mit-dem-template-selector
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
