[TYPO3] bodyTag depends on columns

JoH info at cybercraft.de
Mon Mar 6 23:12:29 CET 2006


>> I think this was working:
>>
>> page {
>>  bodyTag= <body class="onecolumn">
>>  bodyTag.override = <body class="twocolumn">
>>  bodyTag.override.if.isFalse.cObject.numRows {
>>    table = tt_content
>>    select.where = colPos=1
>>    }
>>  }
>>
>> So only if there is no content in colPos 1 the class is "onecolumn"
>
> I've tried but it seems not working ... maybe it's me but are you sure
> we can use stdWrap property on bodyTag ?? i can't find this option in
> the tsref ...
> Gonna check again my TS..

bodyTag hasn't got stdWrap properties - but your first approach has.
So let's combine these:

std.bodyTagCObject = COA
std.bodyTagCObject {
    10 = TEXT
    10 {
        value = <body id="col3">
        if.isTrue.numRows < styles.content.getRight
    }
    20 = TEXT
    20 {
        value = <body id="col2">
        if.isFalse.numRows < styles.content.getRight
    }
}

Not tested but should be working.
Even though I still don't get why you need different ids just to get a 2 or
3 column layout.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de





More information about the TYPO3-english mailing list