[Typo3-dev] Pboblem with content area template and template selctor plugin
Claudio Anzolin
anzolin at gmx.de
Wed Jun 16 22:44:15 CEST 2004
Hi
I have installed the Template Selector Extension and since a few days I
try to use it.
It works well with the main template, but it does not run with content
templates.
I followed the Modern Template Building Tutorial (part 2+3) to built my
page.
I can change the main template and also select a content template from
the repository.
The content template never appears in the preview. When I try to
substitute the content subpart with a TEXT element, it works.
In the TS object browser all seems right. I have no idea, I've tried
every solution that I found on the net.
I need help!!
Ace
Here my templates setups
# Content Area TEMPLATE cObject
temp.contentArea = TEMPLATE
temp.contentArea {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
# CREATES A COPY since we need to manipulate some properties!
template < plugin.tx_automaketemplate_pi1
# Reconfigurating the "tmplselect" plugin to select from the
# "conten area templates " in sub/ folder instead of main templates:
template.content.templateType = sub
template.content.defaultTemplateFileName = ct_3.htm
# Since the template files are now located in another path
# the relative prefix must be changed as well:
template.relPathPrefix = fileadmin/template/sub/
# Clears the "elements" property:
template.elements >
# Sets the DIV and TD elements to be wrapped in subparts:
# Wrap the header section but remove <title> and <style> sections:
template.elements {
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title, style
## I've no DIVS
TD.all = 1
}
# Select only the content of the <id="ct3"> element
##### ct3 is the content area of the content html template ####
workOnSubpart = ct3
subparts {
colNormal < styles.content.get
colLeft < styles.content.getLeft
colRight < styles.content.getRight
}
}
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 = DOKUMENT
# Substitute the ###navigation### subpart with the dynamic menu:
#subparts.navigation < temp.main_menu
subparts.navigation = TEXT
subparts.navigation.value = HIER SOLL DAS MENU PLATZ FINDEN
# Substitute the ###adresse### subpart with some example content:
subparts.adress = TEXT
subparts.adress.value = HALLO ADRESSE
# Substitute the ###content### subpart with the content area template
subparts.content < temp.contentArea
#subparts.content = TEXT
#subparts.content.value = Hier soll das Content platz finden
}
# Config (automaketemplate plugin)
plugin.tx_automaketemplate_pi1 {
#content= FILE
# Read Template
#content.file = fileadmin/template/main/template_1.htm
content < plugin.tx_rlmptmplselector_pi1
content.defaultTemplateFileName =
fileadmin/template/main/template_1.htm
# Creating Subparts
elements {
BODY.all = 1
BODY.all.subpartMarker = DOKUMENT
HEAD.all = 1
HEAD.all.subpartMarker = HEADER
HEAD.rmTagSections = title
# Creating Markers for the tags TD.all = 1
}
# Adjust relative path
relPathPrefix = fileadmin/template/main/
}
More information about the TYPO3-dev
mailing list