Hallo,
ich bin auf der suche nach so einem Typoscript nur habe ich noch ein paar fragen.
ich wollte nun für zb. die hauptseiten template_01.html verwenden und für die unterseiten template_02.html verwenden.
geht das denn auch mit der if und else abfrage?
--------------
Mein Baum:
Bild: user.ingeniumdesign.de/…/zwei_templates_01.jpg
Mein Typo3Script = root
------
# ---------------------
# Configuring the Auto-Parser for main template:
# ---------------------
plugin.tx_automaketemplate_pi1 {
content = FILE
content.file = fileadmin/templates/index.html
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title
DIV.all = 1
#SPAN.all = 1
#TD.all = 1
}
relPathPrefix = fileadmin/templates/
}
# ---------------------
# Main TEMPLATE cObject for the BODY
# ---------------------
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
# 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
subparts.head_navi < temp.headnavi
subparts.navi < temp.menu
subparts.rootline < temp.mypath
#subparts.flash_wrap < temp.flash
subparts.submenu_wrap < temp.submenu
subparts.content < styles.content.get
#subparts.short_news < temp.shortnews
subparts.fusstext < temp.fusstext
}
# ---------------------
# 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
}
# ---------------------
# Default PAGE object:
# ---------------------
page = PAGE
page.typeNum = 0
page.includeCSS {
file1 = fileadmin/templates/inc/main.css
file2 = fileadmin/templates/inc/tt_news_v1.css
file3 = fileadmin/templates/inc/lz_gallery_temp_01.css
}
#page.stylesheet < inc/main.css
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10 < temp.headTemplate
----
Mein TypoScript in zb: "WeinFrankreich"
----
# ---------------------
# PRODUKT-MENU
# ---------------------
temp.produkt_menu = HMENU
temp.produkt_menu {
# Eingangslevel
special = directory
special.value = 40
# First level menu-object, textual
1 = TMENU
1.wrap = |
# Normal state properties
1.NO = 1
1.NO{
linkWrap = <div>|</div>
}
# Enable active state and set properties:
1.ACT = 1
1.ACT{
linkWrap = <div class="produkt_menu_act">|</div>
}
1.CUR = 1
1.CUR{
linkWrap = <div class="produkt_menu_act">|</div>
}
}
# ---------------------
# Configuring the Auto-Parser for main template:
# ---------------------
plugin.tx_automaketemplate_pi1 {
content = FILE
content.file = fileadmin/templates/index_produkte.html
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title
DIV.all = 1
#SPAN.all = 1
#TD.all = 1
}
relPathPrefix = fileadmin/templates/
}
# ---------------------
# Main TEMPLATE cObject for the BODY
# ---------------------
temp.mainTemplate2 = TEMPLATE
temp.mainTemplate2 {
# 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
subparts.head_navi < temp.headnavi
subparts.navi < temp.menu
subparts.rootline < temp.mypath
#subparts.flash_wrap < temp.flash
subparts.submenu_wrap < temp.submenu
subparts.produkt_menu < temp.produkt_menu
subparts.content_produkte < styles.content.get
subparts.fusstext < temp.fusstext
}
# ---------------------
# Default PAGE object:
# ---------------------
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate2
----
wie könnte ich das nun ein wenig umbauen, ohne jedesmal ein neues ext.templates auf die neue seite einbinden zu müssen?