[TYPO3] Change body tag with conditional Test

Christopher Torgalson bedlamhotel at gmail.com
Fri Oct 5 13:56:11 CEST 2007


Hi,

On 10/5/07, Daniel Tâche <daniel at comeandsee.ch> wrote:
> Hello,
>
> I'm doing this conditional test to change my body tag:
>
>
> 10 = COA
> 10{
>
>    10 = COA
>    10 {
>        if.isTrue.cObject = TEXT
>        if.isTrue.cObject {
>            data = DB : pages:68:hidden
>        }
>        10 = TEXT
>        10.value = hidden
>        20 = PAGE
>    20.bodyTag = <body onLoad="ouvrir_popup();">
>    }
>    20 = COA
>    20 {
>        if.isFalse.cObject = TEXT
>        if.isFalse.cObject {
>            data = DB : pages:68:hidden
>        }
>        10 = TEXT
>        10.value = not hidden
>        20 = PAGE
>    20.bodyTag = <body onLoad="fermer_popup();">
>    }
> }
>
>
> It's working with the TEXT because I'v tested it in a mapped library in
> my template. But I don't why it's not working for the PAGE !
>
> Any Idea ?
> Thanks in advance


PAGE is a top-level object. It cannot belong to a COA. If you want a
nice working example of how to do what you're doing, check the
TemplaVoila newsgroup and look for the subject "how to map a body
attribute".


-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list