[TYPO3] Dynamically choose the right template using TEMPLATE COA IF - HOW TO
Karol Martinka
kmartinka at accalio.com
Sun Dec 16 20:18:41 CET 2007
Hello,
I have this code, which works, except that I'm unable to process the template on the end at all :)) (below the line temp.mainTemplate { - the code is skipped) - Btw. I think the problem might be the association - highlighted in RED. But how to repair it, please? I don't want to duplicate my code..
temp.mainTemplateProc = COA
temp.mainTemplateProc {
10 = COA
10 {
if.isTrue.numRows < styles.content.getRight
10 = TEMPLATE
10 {
template = FILE
template.file = fileadmin/templates/textual-template.html
relPathPrefix = fileadmin/templates/
}
}
20 = COA
20 {
if.isFalse.numRows < styles.content.getRight
10 = TEMPLATE
10 {
template = FILE
template.file = fileadmin/templates/textual-template_noRight.html
relPathPrefix = fileadmin/templates/
}
}
}
temp.mainTemplate=TEMPLATE
temp.mainTemplate < temp.mainTemplateProc
temp.mainTemplate {
workOnSubpart=BODY_CONTENT
subparts.MENU_ITEMS < lib.menu
.
.
.
}
Thanks in advance
Karol
More information about the TYPO3-english
mailing list