[TYPO3-english] multiple conditions with if
Katja Lampela
katja.lampela at lieska.net
Sun Apr 22 14:07:48 CEST 2012
Hi,
22.4.2012 13:32, Katja Lampela kirjoitti:
> Hi,
>
> 22.4.2012 12:49, Jigal van Hemert kirjoitti:
>> Hi,
>>
>> On 22-4-2012 10:52, Katja Lampela wrote:
>>> Hi,
>>>
>>> I need to get this condition chain:
>>>
>>> show field1 (10 below)
>>> if field1 is empty show field2 (20)
>>> if both field1 and field2 are empty, show some text (30)
>>
>> 10 = TEXT
>> 10 {
>> value = field1
>> ifEmpty.cObject = TEXT
>> ifEmpty.cObject {
>> value = field2
>> ifEmpty = show some text
>> }
>> }
>>
>
> This is genious!
>
> But I was stupid, I didn't mention the field1 is timestamp for which I need to make the conversion to human readable mode. The original 10 object should have been:
>
> 10 = TEXT
> 10 {
> if {
> isTrue = ###FIELD1###
> }
> value = ###FIELD2###
> strftime = %d.%m.%
> }
>
>
> the field2 is a string.
>
Okay Jigal, thank you so much, your solution gave me the right direction! Here is the solution:
10 = TEXT
10 {
if.isTrue = field1
value = field1
strftime = %d.%m.%Y
}
20 = TEXT
20 {
if.isFalse = field1
value = 0
ifEmpty.cObject = TEXT
ifEmpty.cObject {
value = field2
ifEmpty = show some text
}
--
With kind regards
Katja Lampela
*Lieska-tuotanto*
www.lieska.net
More information about the TYPO3-english
mailing list