[TYPO3] Different HTML templates depending on optional right column
Bernd Wilke
xoonsji02 at sneakemail.com
Wed Nov 7 12:45:45 CET 2007
Rickard Andersson schrieb:
> I'm afraid I don't exactly understand what you mean. I tried this:
>
> temp.maintemplate = COA
^
> temp.maintemplate {
^
> 10 = COA
> 10 {
> if.isTrue.numRows < styles.content.getRight
> 10 = TEMPLATE
> 10 {
> template = FILE
> template.file = fileadmin/template/2col.html
> }
> }
> 20 = COA
> 20 {
> if.isFalse.numRows < styles.content.getRight
> 10 = TEMPLATE
> 10 {
> template = FILE
> template.file = fileadmin/template/1col.html
> }
> }
> }
>
> temp.mainContent = TEMPLATE
> temp.mainContent {
> template.file < temp.mainTemplate
^
>
> marks.HEADER_1 = TEXT
> marks.HEADER_1.field = title
> marks.MAIN_CONTENTS < styles.content.get
> marks.RIGHT_CONTENTS < styles.content.getRight
> }
>
> And then at the end of the template:
>
> page = PAGE
> page.10 < temp.mainContent
>
> But all I get is a blank page.
>
oh,oh. :-(
just a bit to hasty.
I had to look closer.
the part temp.mainTemplate is no text so my usage was false.
try this one for temp.mainTemplate
temp.mainTemplate = COA
temp.mainTemplate {
10 = COA
10 {
if.isTrue.numRows < styles.content.getRight
10 = TEXT
10.value = fileadmin/template/2col.html
}
}
20 = COA
20 {
if.isFalse.numRows < styles.content.getRight
10 = TEXT
10.value = fileadmin/template/1col.html
}
}
}
and keep watch on upcase!
temp.maintemplate
is different from
temp.mainTemplate
Bernd
--
http://www.pi-phi.de/t3v4/cheatsheet.html
More information about the TYPO3-english
mailing list