[TYPO3-english] re : rlmp_tmplselector template selection
Katja Lampela
katja.lampela at lieska.net
Tue Jan 6 08:47:54 CET 2009
Hi Tony,
At quick glance your order of setup seems to be wrong. You have to make
the different configurations in the right order and in the end you call
them to your page object.
So I would try following order:
1. plugin.tx_rlmptmplselector_pi1 -configuration
2. plugin.tx_automaketemplate_pi1 -configuration (<-rlmptmplselector)
3. main and content area templates (<-automaketemplate)
4. page object
And here below is my working configuration example, I hope it helps :)
- Katja
plugin.tx_rlmptmplselector_pi1 {
// Define the paths leading to the HTML template files
templatePathMain = fileadmin/template/main/
templatePathSub = fileadmin/template/sub/
// Define the filenames used as the default HTML templates
defaultTemplateFileNameMain = mymaintemplate.html
defaultTemplateFileNameSub = mysubtemplate.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 = 0
}
// --- CONFIGURE THE AUTOMAKETEMPLATE EXTENSION --------------------------
plugin.tx_automaketemplate_pi1 {
content < plugin.tx_rlmptmplselector_pi1
relPathPrefix = fileadmin/template/main/
relPathPrefix.A=
relPathPrefix.FORM=
}
// --- CREATE TS TEMPLATES FOR MAIN AND CONTENT AREA ------------------
temp.headTemplate = TEMPLATE
temp.headTemplate {
template =< plugin.tx_automaketemplate_pi1
workOnSubpart = DOCUMENT_HEADER
}
#SUB-TEMPLATES
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 = CONTENT_AREA
subparts.colLeft < styles.content.getLeft
subparts.colRight < styles.content.getRight
subparts.colBorder < styles.content.getBorder
subparts.colNormal < styles.content.get
//subparts.WHAT-EVER-ELSE-SUBPARTS......
}
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
template =< plugin.tx_automaketemplate_pi1
template.content.templateType = main
workOnSubpart = DOCUMENT_BODY
subparts.content-normal < temp.contentAreaTemplate
}
page.10 = TEMPLATE
page.10.marks.PAGE_UID = TEXT
page.10.marks.PAGE_UID.field = uid
page.10.template =< plugin.tx_automaketemplate_pi1
page.10 {
workOnSubpart = DOCUMENT_BODY
subparts.content < temp.contentAreaTemplate
//subparts.WHAT-EVER-ELSE-SUBPARTS.....
}
More information about the TYPO3-english
mailing list