[TYPO3-english] TS combining 2 conditions: if val1=1 and ifEmpty val2

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Sat May 12 08:04:20 CEST 2012


Hello Loek!

On 5/12/12 12:09 AM, Loek Hilgersom wrote:
> Hi Bert,
>
> 10 = TEXT
> 10 {
> value = BBBB
> override = AAA
> override.fieldRequired = nav_title
> if.equals = 1
> if.value.data = cObj:parentRecordNumber
> }
>
> Should do the job!
> Loek

Wow! Compact and elegant, works like a charm!

Looked for a variant and just figured out that this:
...
              override = AAA
              override.if {
                    value = value-to-check
                    isInList.field = nav_title
              }
...
would check the field against a certain value...

Not that intuitive but worked!

Thanks!
Bert

>
> On 05/11/2012 10:11 PM, Bert Hiddink [BENDOO e-work solutions] wrote:
>> Hello,
>>
>> The following:
>> ....
>> 10= TEXT
>> 10 {
>> insertData=1
>> value =AAAAA
>> if.equals = 1
>> if.value.data = cObj:parentRecordNumber
>> }
>> ....works ok, turns true if parentRecordNumber==1
>>
>> However, what if I want to combine this condition with second one:
>> ....
>> 10= TEXT
>> 10 {
>> insertData=1
>> value =AAAAA
>> if.equals = 1
>> if.value.data = cObj:parentRecordNumber
>> if.equals.if.ifEmpty.field = nav_title
>> }
>> }
>>
>> 20= TEXT
>> 20 {
>> insertData=1
>> value =BBBB
>> if.equals = 1
>> if.value.data = cObj:parentRecordNumber
>> if.equals.if.ifNotEmpty.field = nav_title
>> #ifNotEmpty does not seem to exist!!!!
>> }
>> }
>>
>> So, if parentRecordNumber==1 AND nav_title is empty -> print "AAAAA"
>> ELSE
>> if parentRecordNumber==1 AND nav_title is not empty -> print "BBBBB"
>>
>> Any ideas?
>>
>> Thanks in advance!
>>
>> Regards,
>> Bert
>>
>>
>>
>>
>>
>>



More information about the TYPO3-english mailing list