[TYPO3] Different HTML templates depending on optional right column
Rickard Andersson
rickard.andersson+typo3 at gmail.com
Wed Nov 7 14:30:58 CET 2007
Hello again :)
I got some help on IRC. Turns out, you can't use TEXT. You have to use
FILE. So I ended up with this:
temp.mainTemplate = COA
temp.mainTemplate {
10 = COA
10 {
if.isTrue.numRows < styles.content.getRight
10 = FILE
10.file = fileadmin/template/2cols.html
}
20 = COA
20 {
if.isFalse.numRows < styles.content.getRight
10 = FILE
10.file = fileadmin/template/1col.html
}
}
temp.mainContent = TEMPLATE
temp.mainContent {
/ Observe that we're using template and not template.file
template < temp.mainTemplate
marks.....
}
Thanks a lot for the help anyway!
Cheers,
Rickard
On Nov 7, 2007 2:20 PM, Bernd Wilke <xoonsji02 at sneakemail.com> wrote:
> Rickard Andersson schrieb:
> > Ah, sorry. That's what I had. So no, that doesn't help.
>
> That's what I hate about TS.
> I get no understanding about the different types of elements and which
> one can be replace by another. it is a lot of trial and error :-(
> and only on the error I find an explanation for the error afterwards.
>
> maybe joey can find a way to get this together:
> template = TEMPLATE
> template.file < COA/TEXT
>
>
>
> anyway else you should be able to use the trial of Tyler (with the
> duplicate markers)
>
> maybe it can help if you define a temp-object for the TEMPLATE where you
> afterwards redefine the file? (Just to avoid duplicate mentioning of
> markers)
>
> temp.templateToUse = TEMPLATE
> temp.templateToUse {
> template = FILE
> template.file = fileadmin/templates/templates-2column.html
> workOnSubPart = document_body
> marks {
> logo < temp.logo
> topnav < temp.topnav
> MAIN_CONTENTS < styles.content.get
> RIGHT_CONTENTS < styles.content.getRight
> }
> }
>
> temp.maintemplate= COA
> temp.maintemplate {
> 10 = COA
> 10 {
> if.isTrue.numRows < styles.content.getRight
> 10 < temp.templateToUse
> 10.template.file = fileadmin/templates/template-2column.html
> }
> 20 = COA
> 20 {
> if.isFalse.numRows < styles.content.getRight
> 10 < temp.templateToUse
> 10.template.file = fileadmin/templates/template.html
> }
> }
>
> (last try to blame myself on this subject ;-)
>
>
> Bernd
> --
> http://www.pi-phi.de/t3v4/cheatsheet.html
> _______________________________________________
>
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
More information about the TYPO3-english
mailing list