---
title: "AutoTemplatesParser im Frameset - parsing mehrere Templates"
url: "https://www.typo3.net/d/9885-autotemplatesparser-im-frameset-parsing-mehrere-templates"
source: "typo3.net"
tags: ["TYPO3","Template","Frage"]
created: "2004-03-16"
last_reply: "2004-09-03"
replies: 2
solved: false
page: 1
pages: 1
lang: "de"
---

# AutoTemplatesParser im Frameset - parsing mehrere Templates

TYPO3 › Template · 2 Antworten · gestartet 2004-03-16

## Eröffnungsbeitrag

**NikolaVeber** · 2004-03-16 · [Beitrag #1](https://www.typo3.net/d/9885-autotemplatesparser-im-frameset-parsing-mehrere-templates/1)

Hallo!

Ich habe ein Problem beim benutzen von mehrere Templates in frameset. Ich habe 3 Frames, je mit einem Template.
Die werden in typoScript definiert, aber ich kann nicht mehrere instanzen von plugin-tx_automaketemplate_pi1 object haben und deshalb bekomme ich 3 mall das selbe Template.
Die tx_automaketemplate_pi1 wird so definiert:

```typoscript
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
  content = FILE
  content.file = fileadmin/templates/main/html/template_oben.html
  # Here we define which elements in the HTML that should be wrapped in subpart-comments:
  elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY
    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title
    TD.all = 1
  }
  # Prefix all relative paths with this value:
  relPathPrefix = fileadmin/templates/main/html/
}
```

und so für alle 3 Frames, mit untersciedliche template files. Ist das ein gutes Approach für Frameeinbau, oder sollte ich vieleicht 3 sub-seiten haben je für ein frame?...

Danke!

## Antworten

### [#2](https://www.typo3.net/d/9885-autotemplatesparser-im-frameset-parsing-mehrere-templates/2) · aclives · 2004-03-26

Hallo

Check mal, wie du die einzelen plugin-Instanzen an die Seiten hängst. Wenn du, wie in einem Tutotial beschrieben den Referenz-Operator (=<) nimmst kriegst du immer das zuletzt definierte Template (..es kann nur einen geben...).
Wenn du die Instanzen jeweils nach der Definition mit dem Kopieroperator (<) einfügtst, sollt es klappen.

Beispiel aus einem Template von mir:
# Definition of Top Frame mit Menu mtop

plugin.tx_automaketemplate_pi1 {
  content = FILE
  content.file = fileadmin/template/mnt/top_template.html
  elements {
    HEAD.rmTagSections = title
  }
  relPathPrefix = fileadmin/template/mnt/
}

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

top = PAGE
top.typeNum = 1
top.10 = TEMPLATE
top.10 {
  template < plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_BODY
  subparts.CONTENT < temp.mtop

... u.s.w.

Definition nächstes Frame analog mit neuer Plugin-instanz.

Hoffentlich hilfts ;-)

Gruss, aclives

### [#3](https://www.typo3.net/d/9885-autotemplatesparser-im-frameset-parsing-mehrere-templates/3) · Friederich · 2004-09-03

Hallo,

Ich versuche auch genau das zu machen, leider ohne Erfolg zu haben.

Mein TS-Setup:

> ########################
> #       TEMPLATE SELECTOR        #
> ########################
> plugin.tx_rlmptmplselector_pi1 {
>
>    templatePathMain = fileadmin/templates/wmlt/html/main/
>    templatePathSub = fileadmin/templates/wmlt/html/sub/
>
> #Define the filenames used as the default HTML templates
>    defaultTemplateFileNameMain = content.html
>    defaultTemplateFileNameSub = ContentNormal.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
> }
>
> ########################
> #            AUTOPARSER             #
> ########################
> plugin.tx_automaketemplate_pi1 {
>    content < plugin.tx_rlmptmplselector_pi1
>
> # Here we define which elements in the HTML that
>    # should be wrapped in subpart-comments:
>    elements {
>       BODY.all = 1
>       BODY.all.subpartMarker = DOCUMENT_BODY
>
>       HEAD.all = 1
>       HEAD.all.subpartMarker = DOCUMENT_HEADER
>       HEAD.rmTagSections = title
>
>       DIV.all = 1
>       TD.all = 1
>       p.all = 1
>    }
> }
>
> ########################
> #       HEADER  CONTENT            #
> ########################
> # 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
> }
>
> ########################
> #           SUB  CONTENT            #
> ########################
> 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.colNormal < styles.content.get
>    subparts.colRight < styles.content.getRight
>    subparts.colLeft < styles.content.getLeft
> }
>
> ########################
> #           MAIN CONTENT            #
> ########################
> temp.mainTemplate = TEMPLATE
> temp.mainTemplate {
>    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
>    template < plugin.tx_automaketemplate_pi1
>
> #Modify the template selector config: This is a sub template!
>    template.content.templateType = main
>
> # Select only the content between the <body>-tags
>    workOnSubpart = DOCUMENT_BODY
>
> # Substitute the ###content### subpart with some example content:
>    subparts.CONTENT < temp.contentAreaTemplate
> }
>
> ############################
> #         PAGE CONTENT FRAMESET       #
> ############################
> frameset = PAGE
> frameset.typeNum = 0
>
> ############################
> #          PAGE CONTENT LEFT              #
> ############################
> leftFrame = PAGE
> leftFrame.typeNum = 1
>
> #Page-content
> leftFrame.10 = TEMPLATE
> leftFrame.10 {
>    template = FILE
>    template.file = fileadmin/templates/wmlt/html/left.html
> }
>
> ############################
> #          PAGE CONTENT MIDDLE          #
> ############################
> middleFrame = PAGE
> middleFrame.typeNum = 2
>
> ############################
> #          PAGE CONTENT RIGHT           #
> ############################
> rightFrame = PAGE
> rightFrame.typeNum = 3
>
> #Page-content
> rightFrame.10 = TEMPLATE
> rightFrame.10 {
>   template = FILE
>   template.file = fileadmin/templates/wmlt/html/right.html
> }
>
> ############################
> #          PAGE CONTENT MENU             #
> ############################
> menuFrame = PAGE
> menuFrame.typeNum = 4
>
> #Page-content
> menuFrame.10 = TEMPLATE
> menuFrame.10 {
>   template = FILE
>   template.file = fileadmin/templates/wmlt/html/menu.html
> }
>
> ############################
> #          PAGE CONTENT CONTENT        #
> ############################
> contentFrame = PAGE
> contentFrame.typeNum = 5
> contentFrame.bodyTag = <body class="home">
> contentFrame.stylesheet = fileadmin/templates/wmlt/css/home.css
>
> #Page-content
> contentFrame.10 = TEMPLATE
> contentFrame.10 < temp.mainTemplate
>
> ####################################
>                                                   REGION FRAME DEFINITION
> ####################################
>
> ########################
> #            AUTOPARSER             #
> ########################
> plugin.tx_automaketemplate_pi1 {
>    content = FILE
>    content.file = fileadmin/templates/wmlt/html/region.html
>
> # Here we define which elements in the HTML that
>    # should be wrapped in subpart-comments:
>    elements {
>       BODY.all = 1
>       BODY.all.subpartMarker = DOCUMENT_BODY
>
>       HEAD.all = 1
>       HEAD.all.subpartMarker = DOCUMENT_HEADER
>       HEAD.rmTagSections = title
>
>       DIV.all = 1
>       TD.all = 1
>       p.all = 1
>    }
> }
>
> ########################
> #           REGION CONTENT         #
> ########################
> temp.regionTemplate = TEMPLATE
> temp.regionTemplate {
>    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
>    template =< plugin.tx_automaketemplate_pi1
>
> # Select only the content between the <body>-tags
>    workOnSubpart = DOCUMENT_BODY
>
> # Substitute the ###content### subpart with some example content:
>    subparts.LOCATION_INFO < temp.LOCATION_INFO
> }
>
> ############################
> #          PAGE CONTENT REGION          #
> ############################
> regionFrame = PAGE
> regionFrame.typeNum = 6
> regionFrame.bodyTag = <body background="fileadmin/templates/wmlt/images/navi/unten/{$regionKey}_unten.gif">
>
> #Page-content
> regionFrame.10 = TEMPLATE
> regionFrame.10 < temp.regionTemplate
>
> ############################
> #             CREATE FRAMESET             #
> ############################
> frameset.frameSet.cols= *,780,*
> frameset.frameSet.params = border="0" framespacing="0" frameborder="0"
> frameset.frameSet {
>   1 = FRAME
>   1.obj = leftFrame
>   1.params = scrolling="NO" noresize frameborder="NO" marginwidth="0" marginheight="0"
>   2 = FRAMESET
>   2.obj = middleFrame
>   2.params = framespacing="0"  frameborder="0"  marginheight="0"
>   2.rows= 106,*,45
>   2 {
>     1 = FRAME
>     1.obj = menuFrame
>     1.params = frameborder="0" noresize marginheight="0" border="0" scrolling="NO"
>     2 = FRAME
>     2.obj = contentFrame
>     2.params = frameborder="0" marginheight="0" border="0" scrolling="AUTO"
>     3 = FRAME
>     3.obj = regionFrame
>     3.params = frameborder="0" noresize marginheight="0" border="0" scrolling="NO"
>   }
>   3 = FRAME
>   3.obj = rightFrame
>   3.params = scrolling="NO" noresize frameborder="NO" marginwidth="0" marginheight="0"
> }

Hoffe ein Typo3-Profi kann mir helfen und sagen woran es liegen könnte.

Vielen vielen Dank bereits jetzt!
Gruss Rolf

---

Quelle: „AutoTemplatesParser im Frameset - parsing mehrere Templates“, typo3.net, https://www.typo3.net/d/9885-autotemplatesparser-im-frameset-parsing-mehrere-templates
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
