[Typo3] cObject CASE

JoH info at cybercraft.de
Wed Sep 21 11:16:48 CEST 2005


> lib.plusloin_title = CASE
> lib.plusloin_title.key = ????????
> lib.plusloin_title.if.isTrue.field = field_content
> lib.plusloin_title.default < tmp.plusloin
> lib.plusloin_title.1 < tmp2.plusloin
>
> I wanna know if the the field field_content is empty or not then I
> will set my lib depending on it.
> How can I set what I want as the key value?

Well - you don't need a CASE for that, since there are only two possible
options: Empty or not.
A CASE is used to split up more than two options. So in your case it's
enough to do the following:

lib.plusloin_title = COA
lib.plusloin_title {
    10 = COA
    10 {
        if.isFalse.field = field_content
        10 < tmp.plusloin
    }

    20 = COA
    20 {
        if.isTrue.field = field_content
        20 < tmp2.plusloin
    }
}

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.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-english mailing list