Zum Inhalt springen

Template Selector

Erstellt am 4. Oktober 2004 · 2 Antworten · letzte Antwort am 3. März 2005

Tags: Frage

lefreak ·

Hallo zusammen,

ich versuche gerade die Template Selector Extension irgendwie zur Mitarbeit zu überreden, komme aber leider nicht weiter.

Ich bekomme zwar mein Haupttemplate und die Menüstruktur angezeigt, das Subtemplate für den Inhalt welches ich mit Hilfe deser Extension auswählen möchte wird jedoch nicht angezeigt.

Ich poste mal mein Setup:

Hier das Haupttemplate:

config.doctype = xhtml_trans
config.xhtml_cleaning = all 

# Standardsprache festlegen
config.locale_all = de_DE@euro 



plugin.tx_rlmptmplselector_pi1 { 

templatePathMain = fileadmin/template/main/ 
templatePathSub = fileadmin/template/sub/ 


defaultTemplateFileNameMain = asg_v2.html 
defaultTemplateFileNameSub = content_v1.html 



inheritMainTemplates = 1 
inheritSubTemplates = 1 
} 



#####################################
# 
# Configuring the Autoparser
plugin.tx_automaketemplate_pi1 { 1

content = FILE
content.file = fileadmin/template/main/asg_v2.html

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

} 

# prefixes all relativ paths
relPathPrefix = fileadmin/template/main/

} 


##################################
# MAIN Template cObject for the <body>
##################################
temp.mainTemplate = TEMPLATE
temp.mainTemplate { 


template < plugin.tx_automaketemplate_pi1



workOnSubpart = DOCUMENT_BODY

##########
# mainmenu
subparts.raster_container < temp.Menu1Ebene1
subparts.raster_container2 < temp.Menu1Ebene2

##########
# clickable path
subparts.rootline < temp.Rootline

##########
# content

subparts.content < temp.contentArea


} 



##################################
# MAIN TEMPLATE cObject for the <head>
##################################
temp.headTemplate = TEMPLATE
temp.headTemplate { 

# Feeding the Autoparsercontent to the TEMPLATE cObject
template =< plugin.tx_automaketemplate_pi1

# select only the content between the <body> Tags
workOnSubpart = DOCUMENT_HEADER
} 

##################################
# Default PAGE object:
##################################
page = PAGE
page.typeNum = 0


page { 

# bodytag
bodyTag = <body leftmargin="0" topmargin="0" >

# cascading stylesheets
includeCSS { 
file1 = fileadmin/template/main/styles_v2.css
file2 = fileadmin/template/main/menu_v2.css
file3 = fileadmin/template/main/content.css
} 

# included libraries and plugins
includeLibs.gmenu_layers = media/scripts/gmenu_layers.php
includeLibs.tmenu_layers = media/scripts/tmenu_layers.php 
 

} 


page.headerData.10 = temp.headTemplate

page.10 < temp.mainTemplate

So und jetzt noch das Setup für temp.contentArea:

##############################
# Main CONTENT Section
##############################


temp.contentArea = TEMPLATE

temp.contentArea {

  template < plugin.tx_automaketemplate_pi1

 
  template.templateType = sub
  template.defaultTemplateFileName = content_v1.html

  template.relPathPrefix = fileadmin/template/sub/
 
    # Clears the "elements" property:
  template.elements > 

  template.elements { 
    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title, style
    
    DIV.all = 1
    TD.all = 1
  } 
 

  workOnSubpart = document_contentarea

  subparts { 
    content < styles.content.get
    # contentleft < styles.content.getLeft
    # contentright < styles.content.getRight
  } 

}

Danke schon mal jeden noch so kleinen Hinweis der mir irgendwie weiterhilft.

lefreak ·

Hab die Lösung:

plugin.tx_rlmptmplselector_pi1 {

templateType = main

	
templatePathMain = fileadmin/ep/main/
#templatePathSub = fileadmin/eb/sub/

# Default Template
defaultTemplateFileNameMain = template.html
 #defaultTemplateFileNameSub = content_v1.html


defaultTemplateObjectMain = 10
#defaultTemplateObjectSub = 10

# Schalter -> HTML vs TSMode
templateObjects.main = file
#templateObjects.sub = file

# Schalter Default Template ein/aus
inheritMainTemplates = 1
#inheritSubTemplates = 1
}


# PlugIn: Template Automake 

plugin.tx_automaketemplate_pi1 { 
content < plugin.tx_rlmptmplselector_pi1

# Default Template
content.defaultTemplateFileNameMain = template.html

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

     BODY.all = 1 
     BODY.all.subpartMarker = DOCUMENT_BODY  
     TD.all = 1     
     DIV.all = 1
     TABLE.all = 1
     TR.all = 1
     
   } 
   relPathPrefix = fileadmin/ep/main/ 
}
###########################################